Author: manolo
Date: 2011-02-24 02:27:33 -0800 (Thu, 24 Feb 2011)
New Revision: 8469
Log:
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.
Modified:
branches/branch-1.3/README.OSX.txt
branches/branch-1.3/configure.in
Modified: branches/branch-1.3/README.OSX.txt
===================================================================
--- branches/branch-1.3/README.OSX.txt 2011-02-24 10:04:59 UTC (rev 8468)
+++ branches/branch-1.3/README.OSX.txt 2011-02-24 10:27:33 UTC (rev 8469)
@@ -91,7 +91,7 @@
./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 @@
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 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.
Modified: branches/branch-1.3/configure.in
===================================================================
--- branches/branch-1.3/configure.in 2011-02-24 10:04:59 UTC (rev 8468)
+++ branches/branch-1.3/configure.in 2011-02-24 10:27:33 UTC (rev 8469)
@@ -35,7 +35,9 @@
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 @@
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 @@
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")
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit