* Fix gettext -framework usage. This is needed for SDK support.
authorDerk-Jan Hartman <hartman@videolan.org>
Wed, 5 Apr 2006 21:50:43 +0000 (21:50 +0000)
committerDerk-Jan Hartman <hartman@videolan.org>
Wed, 5 Apr 2006 21:50:43 +0000 (21:50 +0000)
extras/contrib/src/Makefile
extras/contrib/src/Patches/gettext-macosx.patch [new file with mode: 0644]

index d1d10c9..a497c29 100644 (file)
@@ -376,6 +376,10 @@ gettext-$(GETTEXT_VERSION).tar.gz:
 
 gettext: gettext-$(GETTEXT_VERSION).tar.gz
        $(EXTRACT_GZ)
+ifdef HAVE_DARWIN_OS
+       patch -p 0 < Patches/gettext-macosx.patch
+       (cd $@; ./autogen.sh)
+endif
 
 .intl: gettext .iconv
 ifdef HAVE_WIN32
diff --git a/extras/contrib/src/Patches/gettext-macosx.patch b/extras/contrib/src/Patches/gettext-macosx.patch
new file mode 100644 (file)
index 0000000..8c305db
--- /dev/null
@@ -0,0 +1,30 @@
+diff -ruN gettext/gettext-runtime/m4/gettext.m4 gettext-0.14.5/gettext-runtime/m4/gettext.m4
+--- gettext/gettext-runtime/m4/gettext.m4      2005-04-07 13:37:04.000000000 +0200
++++ gettext-0.14.5/gettext-runtime/m4/gettext.m4       2006-04-05 23:21:45.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 -framework CoreFoundation"
+   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 -framework CoreFoundation"
+      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 -framework CoreFoundation"
+      gt_save_LIBS="$LIBS"
+      LIBS="$LIBS -framework CoreFoundation"
+      AC_TRY_LINK([#include <CFLocale.h>], [CFLocaleCopyCurrent();],