diff options
| author | Manolo Gouy <Manolo> | 2011-02-24 10:27:33 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2011-02-24 10:27:33 +0000 |
| commit | 8d9f90e416b90af9a33931be0cda93d5e8c217ce (patch) | |
| tree | 98a98ffd3e840658f0b4bfe9755782bbc40a06ae | |
| parent | d8822aa74af1c886f7ef4df58e42f52af397042d (diff) | |
Mac OS only: Added the architecture flags to the dynamic library-creating command
in configure.in. Also, applied suggestion in "Fixing configure.in for OSX universal builds"
from the fltk.development forum that architecture flags are not transmitted from
configure to the fltk-config script. This brings 2 benefits:
- A universal library can be prepared, and then used to build applications of any sort
of architectures.
- Makefiles using non-Apple compilers that don't know the -arch option can call fltk-config.
This new behavior in now made clear in file README.OSX.txt.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8469 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
| -rw-r--r-- | README.OSX.txt | 10 | ||||
| -rw-r--r-- | configure.in | 13 |
2 files changed, 18 insertions, 5 deletions
diff --git a/README.OSX.txt b/README.OSX.txt index fbe6ccc81..bc7652361 100644 --- a/README.OSX.txt +++ b/README.OSX.txt @@ -91,7 +91,7 @@ Now configure your FLTK installation: ./configure ADVANCED: type "./configure --help" to get a complete list of optional -configurations parameters. These should be pretty self-explenatory. Some +configurations parameters. These should be pretty self-explanatory. Some more details can be found in README. To create Universal Binaries, start "configure" with these flags: @@ -141,8 +141,11 @@ installation path to a location within the user account by adding the FLTK provides a neat script named "fltk-config" that can provide all the flags needed to build FLTK applications using the same flags that were used to build -the library itself. Running "fltk-config" without arguments will print a list -options. The easiest call to compile an FLTK application from a single source +the library itself. Architecture flags (e.g., -arch i386) used to build the +library, though, are not provided by the fltk-config script. This allows to +build universal libraries and to produce applications of any architecture +from them. Running "fltk-config" without arguments will print a list +of options. The easiest call to compile an FLTK application from a single source file is: fltk-config --compile myProgram.cxx @@ -312,3 +315,4 @@ Oct 29 2010 - matt: removed warnings Oct 24 2010 - matt: restructured entire document and verified instructions Dec 19 2010 - Manolo: corrected typos Dec 29 2010 - Manolo: removed reference to AudioToolbox.framework that's no longer needed +Feb 24 2011 - Manolo: architecture flags are not propagated to the fltk-config script. diff --git a/configure.in b/configure.in index 41d3f99da..5f3e625a9 100644 --- a/configure.in +++ b/configure.in @@ -35,7 +35,9 @@ 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" + if test "x$with_archflags" != x ; then + CFLAGS="$CFLAGS $with_archflags" + fi USEMMFILES="Yes" else USEMMFILES="No" @@ -225,7 +227,7 @@ if test x$enable_shared = xyes; then GLDSONAME="libfltk_gl.$FL_API_VERSION.dylib" IMGDSONAME="libfltk_images.$FL_API_VERSION.dylib" CAIRODSONAME="libfltk_cairo.$FL_API_VERSION.dylib" - DSOCOMMAND="\$(CXX) \$(DSOFLAGS) -dynamiclib -lc -o" + DSOCOMMAND="\$(CXX) \$(ARCHFLAGS) \$(DSOFLAGS) -dynamiclib -lc -o" ;; SunOS* | UNIX_S*) @@ -1282,6 +1284,13 @@ fi OPTIM="$DEBUGFLAG $OPTIM" +dnl Take archflags away from CFLAGS (makefiles use ARCHFLAGS explicitly) +if test `uname` = Darwin; then + if test "x$with_archflags" != x ; then + CFLAGS="`echo $CFLAGS | sed -e "s/$with_archflags//g"`" + fi +fi + dnl Define the FLTK documentation directory... if test x$prefix = xNONE; then AC_DEFINE_UNQUOTED(FLTK_DOCDIR, "/usr/local/share/doc/fltk") |
