Merge from Samba 3.0:
authorTim Potter <tpot@samba.org>
Mon, 15 Sep 2003 05:26:44 +0000 (05:26 +0000)
committerTim Potter <tpot@samba.org>
Mon, 15 Sep 2003 05:26:44 +0000 (05:26 +0000)
>Fix for typo in darwin detection.
>Jeremy.

>Fix for MacOS/X which uses STUPID BROKEN UNICODE COMPOSE CHARACTERS !
>(rant off :-). Inspired by work from Benjamin Riefenstahl <Benjamin.Riefenstahl@epost.de>.
>Also add MacOSX/Darwin configure fixes.
>Jerry - can we put this in 3.0 release ? :-).
>Jeremy.
(This used to be commit 7951dee600146623ce473659c3f41963ea873e3e)

source3/configure.in

index a2e04b5d480a7dae30cf8dbfdc758bdd9b5cc9be..0cf34bc9a72752c2e6faaf5f683593b9475c098a 100644 (file)
@@ -402,7 +402,6 @@ case "$host_os" in
        *freebsd*)
                AC_DEFINE(FREEBSD, 1, [Whether the host os is FreeBSD])
                ;;
-
 #
 # VOS may need to have POSIX support and System V compatibility enabled.
 #
@@ -503,6 +502,26 @@ main() {
        AC_MSG_RESULT([$LINUX_LFS_SUPPORT])
                ;;
 
+#
+# MacOS X is the *only* system that uses compose character in utf8. This
+# is so horribly broken....
+#
+    *darwin*)
+               AC_DEFINE(BROKEN_UNICODE_COMPOSE_CHARACTERS, 1, [Does this system use unicode compose characters])
+# Add Fink directories for various packages, like dlcompat.
+# Note: iconv does that explicitly below, but other packages
+# don't.
+               CPPFLAGS="$CPPFLAGS -I/sw/include"
+               LDFLAGS="$LDFLAGS -L/sw/lib"
+
+# If we have dlsym_prepend_underscore (from Fink's dlcompat),
+# use that instead of plain dlsym.
+
+               AC_CHECK_LIB(dl,dlopen)
+               AC_CHECK_FUNCS(dlsym_prepend_underscore,
+               [CPPFLAGS="$CPPFLAGS -Ddlsym=dlsym_prepend_underscore"])
+
+               ;;   
     *hurd*)
         AC_MSG_CHECKING([for LFS support])
         old_CPPFLAGS="$CPPFLAGS"
@@ -1162,6 +1181,14 @@ if test "$enable_shared" = "yes"; then
                        BLDSHARED="false"
                        LDSHFLAGS=""
                        ;;
+
+               *darwin*)   AC_DEFINE(DARWINOS,1,[Whether the host os is Darwin/MacOSX])
+                       BLDSHARED="true"
+                       LDSHFLAGS="-bundle -flat_namespace -undefined suppress"
+                       SHLIBEXT="dylib"
+                       AC_DEFINE(STAT_ST_BLOCKSIZE,512)
+                       ;;
+
                *)
                        AC_DEFINE(STAT_ST_BLOCKSIZE,512)
                        ;;