s3: Fix linking on Lion
authorVolker Lendecke <vl@samba.org>
Sun, 25 Dec 2011 10:00:11 +0000 (11:00 +0100)
committerVolker Lendecke <vl@samba.org>
Sun, 25 Dec 2011 12:31:58 +0000 (13:31 +0100)
We are using CoreFoundation functions in charset_macosx.c. We need to link
against that.

source3/configure.in

index cbea99d18c10e7eb0b8d367b3e1b38322357b32c..6f4300cc48ddac8a79297dd15722d96cd4a34feb 100644 (file)
@@ -768,6 +768,14 @@ CPPFLAGS="-Iinclude $CPPFLAGS"
 AC_CHECK_HEADERS([CoreFoundation/CFStringEncodingConverter.h], [], [AC_CHECK_HEADERS([CFStringEncodingConverter.h])])
 CPPFLAGS="$old_CPPFLAGS"
 
+# To link lib/util/charset/charset_macosxfs.c, we need to tell the linker
+# about CoreFoundation
+case "$host_os" in
+    *darwin11*)
+               LDFLAGS="$LDFLAGS -framework CoreFoundation"
+       ;;
+esac
+
 # In valgrind 1.0.x, it's just valgrind.h.  In 1.9.x+ there's a
 # subdirectory of headers.
 AC_CHECK_HEADERS(valgrind.h valgrind/valgrind.h valgrind/memcheck.h)