summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.OSX.txt10
-rw-r--r--configure.in13
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")