diff options
| author | Manolo Gouy <Manolo> | 2010-11-18 13:23:52 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2010-11-18 13:23:52 +0000 |
| commit | e002042fd921d61f66a234319a9dcfffb570ade6 (patch) | |
| tree | 2f2deade59d78db91f03f8225b9bd04a7c0876c4 | |
| parent | db6ca980af4a0dc06028d15713af5c05a6a3be41 (diff) | |
Mac OS X: compile with default architecture (i386 on 10.5, x86_64 on 10.6) and allow
alternative architecture running configure with option --with-archflags="-arch xxx"
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7870 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
| -rw-r--r-- | configure.in | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/configure.in b/configure.in index d04a686cc..fbd7704d9 100644 --- a/configure.in +++ b/configure.in @@ -33,6 +33,11 @@ AC_PREREQ(2.50) dnl Required file in package... AC_INIT(src/Fl.cxx) +dnl So --with-archflags option is used during "checking size of long" +if test `uname` = Darwin; then + CFLAGS="$CFLAGS $with_archflags" +fi + dnl FLTK library versions... FL_MAJOR_VERSION=1 FL_MINOR_VERSION=3 @@ -102,21 +107,6 @@ case $uname in fi fi ;; - - Darwin*) - # Starting with 10.6 (Snow Leopard), OS X does not support - # Carbon calls anymore. We patch this until we are completely Cocoa compliant - # by limiting ourselves to 32 bit Intel compiles - d_ver_rev=`sw_vers -productVersion | sed -e 's/\.[[0-9]][[0-9]]*//2'` - d_ver=`echo $d_ver_rev | sed -e 's/\.[[0-9]][[0-9]]*//'` - d_rev=`echo $d_ver_rev | sed -e 's/[[0-9]][[0-9]]*\.//'` - if test $d_ver -gt 10 -o $d_ver -eq 10 -a $d_rev -ge 6; then - CFLAGS="$CFLAGS -arch i386" - CXXFLAGS="$CXXFLAGS -arch i386" - LDFLAGS="$LDFLAGS -arch i386" - DSOFLAGS="$DSOFLAGS -arch i386" - fi - ;; esac dnl Define the libraries and link options we will need. @@ -373,9 +363,7 @@ AC_ARG_WITH(archflags, [ --with-archflags="flags" case $uname in Darwin*) # QD is not supported anymore since 1.3 - AC_DEFINE(USE_QUARTZ, 1) AC_DEFINE(__APPLE_QUARTZ__) - AC_DEFINE(__APPLE_COCOA__) ;; esac @@ -840,7 +828,7 @@ case $uname_GUI in Darwin*) # MacOS X uses Cocoa for graphics. There are still some Carbon leftovers. - LIBS="$LIBS -framework Carbon -framework Cocoa -framework ApplicationServices -framework AudioToolbox" + LIBS="$LIBS -framework Cocoa -framework Carbon -framework AudioToolbox" if test x$have_pthread = xyes; then AC_DEFINE(HAVE_PTHREAD) |
