Dear developers,

in two files a path to some system header files is hard-coded with
/System/Library/Frameworks/CoreFoundation.framework/Headers

This is usually not a problem, but wrong and I believe one of the reasons why Bennett (on OS X 10.5) cannot create binaries for 10.4.

If one compiles against the standard SDKs (specified with "-isysroot /Developer/SDKs/MacOSX10.4u.sdk"), then the following headers should be used and not the ones hardcoded:
/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/

Attached two very simple patches (against the 1.6.0beta2 release) which seem to fix the problem.

According to <http://gcc.gnu.org/onlinedocs/gcc-4.3.0/gcc/Preprocessor-Options.html#Preprocessor-Options> this should be the right thing to do (at least for a current gcc), and it compiles fine with i686-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build 5370)

Can I convince somebody to look at this and commit?

Thanks,
Konrad
--- /Users/khofbaue/lyxdevel_16_b1/lyx-1.6.0beta2org/configure  2008-06-02 
17:44:27.000000000 +0200
+++ /Users/khofbaue/lyxdevel_16_b1/lyx-1.6.0beta2test/configure 2008-06-02 
19:52:29.000000000 +0200
@@ -30714,7 +30714,7 @@
   $as_echo_n "(cached) " >&6
 else
   gt_save_CPPFLAGS="$CPPFLAGS"
-     CPPFLAGS="$CPPFLAGS 
-I/System/Library/Frameworks/CoreFoundation.framework/Headers"
+     CPPFLAGS="$CPPFLAGS -I=/Frameworks/CoreFoundation.framework/Headers"
      gt_save_LIBS="$LIBS"
      LIBS="$LIBS -framework CoreFoundation"
      cat >conftest.$ac_ext <<_ACEOF
@@ -30782,7 +30782,7 @@
   $as_echo_n "(cached) " >&6
 else
   gt_save_CPPFLAGS="$CPPFLAGS"
-     CPPFLAGS="$CPPFLAGS 
-I/System/Library/Frameworks/CoreFoundation.framework/Headers"
+     CPPFLAGS="$CPPFLAGS -I=/Frameworks/CoreFoundation.framework/Headers"
      gt_save_LIBS="$LIBS"
      LIBS="$LIBS -framework CoreFoundation"
      cat >conftest.$ac_ext <<_ACEOF
@@ -31980,7 +31980,7 @@
   fi
 
   if test -n "$INTL_MACOSX_LIBS"; then
-    CPPFLAGS="$CPPFLAGS 
-I/System/Library/Frameworks/CoreFoundation.framework/Headers"
+    CPPFLAGS="$CPPFLAGS -I=/Frameworks/CoreFoundation.framework/Headers"
   fi
 
                       for ac_prog in bison
@@ -32065,7 +32065,7 @@
   $as_echo_n "(cached) " >&6
 else
   gt_save_CPPFLAGS="$CPPFLAGS"
-     CPPFLAGS="$CPPFLAGS 
-I/System/Library/Frameworks/CoreFoundation.framework/Headers"
+     CPPFLAGS="$CPPFLAGS -I=/Frameworks/CoreFoundation.framework/Headers"
      gt_save_LIBS="$LIBS"
      LIBS="$LIBS -framework CoreFoundation"
      cat >conftest.$ac_ext <<_ACEOF
@@ -32133,7 +32133,7 @@
   $as_echo_n "(cached) " >&6
 else
   gt_save_CPPFLAGS="$CPPFLAGS"
-     CPPFLAGS="$CPPFLAGS 
-I/System/Library/Frameworks/CoreFoundation.framework/Headers"
+     CPPFLAGS="$CPPFLAGS -I=/Frameworks/CoreFoundation.framework/Headers"
      gt_save_LIBS="$LIBS"
      LIBS="$LIBS -framework CoreFoundation"
      cat >conftest.$ac_ext <<_ACEOF
--- /Users/khofbaue/lyxdevel_16_b1/lyx-1.6.0beta2org/m4/gettext.m4      
2007-08-07 21:22:32.000000000 +0200
+++ /Users/khofbaue/lyxdevel_16_b1/lyx-1.6.0beta2test/m4/gettext.m4     
2008-06-02 19:52:53.000000000 +0200
@@ -445,7 +445,7 @@
   fi
 
   if test -n "$INTL_MACOSX_LIBS"; then
-    CPPFLAGS="$CPPFLAGS 
-I/System/Library/Frameworks/CoreFoundation.framework/Headers"
+    CPPFLAGS="$CPPFLAGS -I=/Frameworks/CoreFoundation.framework/Headers"
   fi
 
   dnl intl/plural.c is generated from intl/plural.y. It requires bison,
@@ -489,7 +489,7 @@
   AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
     gt_cv_func_CFPreferencesCopyAppValue,
     [gt_save_CPPFLAGS="$CPPFLAGS"
-     CPPFLAGS="$CPPFLAGS 
-I/System/Library/Frameworks/CoreFoundation.framework/Headers"
+     CPPFLAGS="$CPPFLAGS -I=/Frameworks/CoreFoundation.framework/Headers"
      gt_save_LIBS="$LIBS"
      LIBS="$LIBS -framework CoreFoundation"
      AC_TRY_LINK([#include <CFPreferences.h>],
@@ -505,7 +505,7 @@
   dnl Check for API introduced in MacOS X 10.3.
   AC_CACHE_CHECK([for CFLocaleCopyCurrent], gt_cv_func_CFLocaleCopyCurrent,
     [gt_save_CPPFLAGS="$CPPFLAGS"
-     CPPFLAGS="$CPPFLAGS 
-I/System/Library/Frameworks/CoreFoundation.framework/Headers"
+     CPPFLAGS="$CPPFLAGS -I=/Frameworks/CoreFoundation.framework/Headers"
      gt_save_LIBS="$LIBS"
      LIBS="$LIBS -framework CoreFoundation"
      AC_TRY_LINK([#include <CFLocale.h>], [CFLocaleCopyCurrent();],

Reply via email to