From 56d01b07dddf6497631a69f6fdcaa6a207ff6949 Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Mon, 26 Nov 2007 13:11:50 +0000 Subject: [PATCH] --enable-universal --- configure | 15 +++++++++++++-- configure.in | 10 ++++++++-- variables.in | 4 +--- 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/configure b/configure index b8856d7c5e..55d89c5ad0 100755 --- a/configure +++ b/configure @@ -879,6 +879,8 @@ Optional Features: --enable-occ enable OpenCascade support (default=no) --enable-med enable MED support (default=yes) --enable-fm enable support for FourierModel (default=yes) + --enable-universal enable support for universal binaries on Mac + (default=no) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -1529,6 +1531,12 @@ if test "${enable_fm+set}" = set; then enableval="$enable_fm" fi; +# Check whether --enable-universal or --disable-universal was given. +if test "${enable_universal+set}" = set; then + enableval="$enable_universal" + +fi; + UNAME=`uname` @@ -4812,7 +4820,7 @@ fi # Provide some information about the compiler. -echo "$as_me:4815:" \ +echo "$as_me:4823:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5 @@ -5440,7 +5448,10 @@ case "$UNAME" in ;; Darwin*) - FLAGS="-DHAVE_NO_DLL ${FLAGS}" + FLAGS="-DHAVE_NO_DLL ${FLAGS}" + if test "x$enable_universal" = "xyes"; then + FLAGS="-arch ppc -arch i686 ${FLAGS}" + fi if test "x$enable_gui" = "xno"; then GMSH_LIBS="${GMSH_LIBS} -framework ApplicationServices" fi diff --git a/configure.in b/configure.in index aecd7e519d..6535897195 100644 --- a/configure.in +++ b/configure.in @@ -1,4 +1,4 @@ -dnl $Id: configure.in,v 1.135 2007-10-19 12:07:19 geuzaine Exp $ +dnl $Id: configure.in,v 1.136 2007-11-26 13:11:50 geuzaine Exp $ dnl dnl Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle dnl @@ -140,6 +140,10 @@ AC_ARG_ENABLE(med, AC_ARG_ENABLE(fm, AC_HELP_STRING([--enable-fm], [enable support for FourierModel (default=yes)])) +AC_ARG_ENABLE(universal, + AC_HELP_STRING([--enable-universal], + [enable support for universal binaries on Mac (default=no)])) + dnl Get the operating system name UNAME=`uname` @@ -748,8 +752,10 @@ case "$UNAME" in ;; Darwin*) - dnl to build a universal binary, add "-arch ppc -arch i686" FLAGS="-DHAVE_NO_DLL ${FLAGS}" + if test "x$enable_universal" = "xyes"; then + FLAGS="-arch ppc -arch i686 ${FLAGS}" + fi if test "x$enable_gui" = "xno"; then GMSH_LIBS="${GMSH_LIBS} -framework ApplicationServices" fi diff --git a/variables.in b/variables.in index 2a1673deec..7cc0778fd7 100644 --- a/variables.in +++ b/variables.in @@ -1,4 +1,4 @@ -# $Id: variables.in,v 1.17 2007-09-05 08:36:21 geuzaine Exp $ +# $Id: variables.in,v 1.18 2007-11-26 13:11:50 geuzaine Exp $ # # Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle # @@ -36,8 +36,6 @@ LINKER=@LINKER@ # All compiler flags except optimization flags FLAGS=@FLAGS@ -# FLAGS+=-arch i386 -arch ppc - # Compiler optimization flags OPTIM=@OPTIM@ -- GitLab