? -dup
? arts.diff
? cvschk
? kdebase
? kdegames
? kdelibs
? kdenetwork
? kdepim
? up
? admin/libtool.m4.in.bk
Index: admin/acinclude.m4.in
===================================================================
RCS file: /home/kde/kde-common/admin/acinclude.m4.in,v
retrieving revision 2.344
diff -d -u -p -r2.344 acinclude.m4.in
--- admin/acinclude.m4.in	1 Mar 2003 16:29:48 -0000	2.344
+++ admin/acinclude.m4.in	5 Mar 2003 05:52:14 -0000
@@ -817,7 +817,14 @@ AC_ARG_ENABLE(
   kde_use_qt_emb_palm=no
 )
 
-if test "$kde_use_qt_emb" = "no"; then
+AC_ARG_ENABLE(
+  mac,
+  [  --enable-mac       link to Qt/Mac (don't use X)],
+  kde_use_qt_mac=$enableval,
+  kde_use_qt_mac=no
+)
+
+if test "$kde_use_qt_emb" = "no" && test "$kde_use_qt_mac" = "no"; then
 
 AC_MSG_CHECKING(for X)
 AC_LANG_SAVE
@@ -976,7 +983,7 @@ fi
 LIB_XEXT="-lXext"
 QTE_NORTTI=""
 
-else
+elif test "$kde_use_qt_emb" = "yes"; then
   dnl We're using QT Embedded
   CPPFLAGS=-DQWS
   CXXFLAGS="$CXXFLAGS -fno-rtti"
@@ -996,6 +1003,26 @@ else
   AC_SUBST(X_LDFLAGS)
   AC_SUBST(x_includes)
   AC_SUBST(x_libraries)
+elif test "$kde_use_qt_mac" = "yes"; then
+  dnl We're using QT/Mac (I use QT_MAC so that qglobal.h doesn't *have* to
+  dnl be included to get the information) --Sam
+  CXXFLAGS="$CXXFLAGS -DQT_MAC -no-cpp-precomp"
+  CFLAGS="$CFLAGS -DQT_MAC -no-cpp-precomp"
+  X_PRE_LIBS=""
+  LIB_X11=""
+  LIB_XEXT=""
+  LIBSM=""
+  X_INCLUDES=""
+  X_LDFLAGS=""
+  x_includes=""
+  x_libraries=""
+  AC_SUBST(X_PRE_LIBS)
+  AC_SUBST(LIB_X11)
+  AC_SUBST(LIBSM)
+  AC_SUBST(X_INCLUDES)
+  AC_SUBST(X_LDFLAGS)
+  AC_SUBST(x_includes)
+  AC_SUBST(x_libraries)
 fi
 AC_SUBST(QTE_NORTTI)
 AC_SUBST(LIB_XEXT)
@@ -1157,7 +1184,7 @@ ac_libs_safe="$LIBS"
 
 CXXFLAGS="$CXXFLAGS -I$qt_includes"
 LDFLAGS="$LDFLAGS $X_LDFLAGS"
-if test "x$kde_use_qt_emb" != "xyes"; then
+if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
 LIBS="$LIBQT -lXext -lX11 $LIBSOCKET"
 else
 LIBS="$LIBQT $LIBSOCKET"
@@ -1324,7 +1351,7 @@ fi
 
 AC_MSG_CHECKING([for Qt])
 
-if test "x$kde_use_qt_emb" != "xyes"; then
+if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
 LIBQT="$LIBQT $X_PRE_LIBS -lXext -lX11 $LIBSM $LIBSOCKET"
 fi
 ac_qt_includes=NO ac_qt_libraries=NO ac_qt_bindir=NO
@@ -1388,6 +1415,12 @@ else
     if test -n "`$try 2> /dev/null`"; then qt_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
   done
 fi
+for a in $qt_libdir/lib`echo ${kde_int_qt} | sed 's,^-l,,'`_incremental.*; do
+  if test -e "$a"; then
+    LIBQT="$LIBQT ${kde_int_qt}_incremental"
+    break
+  fi
+done
 
 ac_qt_libraries="$qt_libdir"
 
@@ -1485,12 +1518,18 @@ AC_PATH_QT_MOC_UIC
 
 KDE_CHECK_QT_JPEG
 
-if test "x$kde_use_qt_emb" != "xyes"; then
+if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
 LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBPNG) -lXext $(LIB_X11) $(LIBSM)'
 else
 LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBPNG)'
 fi
 test -z "$KDE_MT_LIBS" || LIB_QT="$LIB_QT $KDE_MT_LIBS"
+for a in $qt_libdir/lib`echo ${kde_int_qt} | sed 's,^-l,,'`_incremental.*; do
+  if test -e "$a"; then
+     LIB_QT="$LIB_QT ${kde_int_qt}_incremental"
+     break
+  fi
+done
 
 AC_SUBST(LIB_QT)
 AC_SUBST(LIB_QPE)
@@ -2265,7 +2304,7 @@ AC_DEFUN(AC_FIND_GIF,
    [AC_MSG_CHECKING([for giflib])
 AC_CACHE_VAL(ac_cv_lib_gif,
 [ac_save_LIBS="$LIBS"
-if test "x$kde_use_qt_emb" != "xyes"; then
+if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
 LIBS="$all_libraries -lgif -lX11 $LIBSOCKET"
 else
 LIBS="$all_libraries -lgif"
@@ -2469,7 +2508,7 @@ AC_CACHE_VAL(kde_cv_libtiff_$1,
 AC_LANG_SAVE
 AC_LANG_CPLUSPLUS
 kde_save_LIBS="$LIBS"
-if test "x$kde_use_qt_emb" != "xyes"; then
+if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
 LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lX11 $LIBSOCKET -lm"
 else
 LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lm"
@@ -2528,7 +2567,7 @@ AC_MSG_CHECKING([for libpng])
 AC_CACHE_VAL(ac_cv_lib_png,
 [
 kde_save_LIBS="$LIBS"
-if test "x$kde_use_qt_emb" != "xyes"; then
+if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
 LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm -lX11 $LIBSOCKET"
 else
 LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm"
@@ -3302,7 +3341,7 @@ AC_DEFUN(AC_HAVE_XPM,
     AC_LANG_C
     ac_save_ldflags="$LDFLAGS"
     ac_save_cflags="$CFLAGS"
-    if test "x$kde_use_qt_emb" != "xyes"; then
+    if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
       LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm -lX11 -lXext $LIBZ $LIBSOCKET"
     else
       LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm $LIBZ $LIBSOCKET"
@@ -3358,7 +3397,7 @@ AC_DEFUN(AC_HAVE_DPMS,
    dnl 'yes' means DPMS_LIB="", '-lXdpms' means DPMS_LIB="-lXdpms".
    AC_CACHE_VAL(ac_cv_have_dpms,
    [
-    if test "x$kde_use_qt_emb" = "xyes"; then
+    if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
       AC_MSG_RESULT(no)
       ac_cv_have_dpms="no"
     else
@@ -3451,7 +3490,7 @@ AC_DEFUN(AC_HAVE_GL,
     ac_save_ldflags="$LDFLAGS"
     ac_save_cxxflags="$CXXFLAGS"
     LDFLAGS="$LDFLAGS $GL_LDFLAGS $X_LDFLAGS $all_libraries -lMesaGL -lMesaGLU"
-    test "x$kde_use_qt_emb" != xyes && LDFLAGS="$LDFLAGS -lX11"
+    test "x$kde_use_qt_mac" != xyes && test "x$kde_use_qt_emb" != xyes && LDFLAGS="$LDFLAGS -lX11"
     LDFLAGS="$LDFLAGS $LIB_XEXT -lm $LIBSOCKET"
     CXXFLAGS="$CFLAGS $X_INCLUDES"
     test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
@@ -3461,7 +3500,7 @@ AC_DEFUN(AC_HAVE_GL,
 	ac_cv_have_gl="mesa", ac_cv_have_gl="no")
     if test "x$ac_cv_have_gl" = "xno"; then
       LDFLAGS="$ac_save_ldflags $X_LDFLAGS $GL_LDFLAGS $all_libraries -lGLU -lGL"
-      test "x$kde_use_qt_emb" != xyes && LDFLAGS="$LDFLAGS -lX11"
+      test "x$kde_use_qt_mac" != xyes && test "x$kde_use_qt_emb" != xyes && LDFLAGS="$LDFLAGS -lX11"
       LDFLAGS="$LDFLAGS $LIB_XEXT -lm $LIBSOCKET"
       CXXFLAGS="$ac_save_cflags $X_INCLUDES"
       test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
Index: admin/libtool.m4.in
===================================================================
RCS file: /home/kde/kde-common/admin/libtool.m4.in,v
retrieving revision 1.76
diff -d -u -p -r1.76 libtool.m4.in
--- admin/libtool.m4.in	11 Feb 2003 08:22:01 -0000	1.76
+++ admin/libtool.m4.in	5 Mar 2003 05:52:24 -0000
@@ -609,6 +609,12 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [d
     lt_cv_sys_max_cmd_len=-1;
     ;;
 
+  darwin*)
+    # this should be enough... the length test freaks out some versions
+    # of OSX's `expr`
+    lt_cv_sys_max_cmd_len=16384;
+    ;;
+
   *)
     # If test is not a shell built-in, we'll probably end up computing a
     # maximum length that is only half of the actual maximum length, but
@@ -1138,10 +1144,17 @@ darwin* | rhapsody*)
   # FIXME: Relying on posixy $() will cause problems for
   #        cross-compilation, but unfortunately the echo tests do not
   #        yet detect zsh echo's removal of \ escapes.
-  library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)'
+  library_names_spec='${libname}${release}${versuffix}$(test .$module = .yes && echo .so).dylib $(test .$module != .yes && echo ${libname}${release}${major}.dylib ${libname}.dylib)'
   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
   shlibpath_overrides_runpath=yes
   shlibpath_var=DYLD_LIBRARY_PATH
+  postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
+    dldir=$destdir/`dirname \$dlpath`~
+    test -d \$dldir || mkdir -p \$dldir~
+    echo \$dlname | grep .so$ && $install_prog .libs/$dlname \$dldir/$dlname || true'
+  postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
+    dlpath=$dir/\$dldll~
+     echo \$dlname | grep .so$ && $rm \$dlpath || true'
   ;;
 
 dgux*)
@@ -1909,7 +1922,8 @@ darwin* | rhapsody*)
     lt_cv_file_magic_test_file=`/System/Library/Frameworks/System.framework/System`
     ;;
   *) # Darwin 1.3 on
-    lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
+    lt_cv_deplibs_check_method='pass_all'
+       lt_cv_file_magic_cmd=''
     ;;
   esac
   ;;
@@ -2561,6 +2575,27 @@ case $host_os in
 	;;
     esac
     ;;
+  darwin*)
+    shared_flag='-dynamiclib'
+    CCT=""
+    for ENTRY in `what /usr/bin/ld`; do 
+      case $ENTRY in
+        PROJECT:*)
+          CCT=`expr "$ENTRY" : 'PROJECT:cctools-\([[:digit:]]*\)'`
+          ;;
+      esac
+    done
+
+    test -n "$CCT" || CCT=0
+    if true || test "$CCT" -ge 446; then
+      export MACOSX_DEPLOYMENT_TARGET=10.2
+      _LT_AC_TAGVAR(archive_cmds, $1)='$(test .$module = .yes && echo $CC -dynamiclib -single_module -undefined suppress -flat_namespace -o ${lib} $libobjs || echo true) && $CC $(test .$module = .yes && echo -bundle || echo -dynamiclib -single_module) $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $(test .$module = .yes && echo .libs/$soname || echo $lib ) $(test .$module != .yes && echo -install_name $rpath/$soname $verstring)'
+    else
+      # this may cause problems with some libraries!
+      _LT_AC_TAGVAR(archive_cmds, $1)='$(test .$module = .yes && echo $CC -dynamiclib -undefined suppress -flat_namespace -o ${lib} $libobjs || echo true) && $CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $(test .$module = .yes && echo .libs/$soname || echo $lib ) $(test .$module != .yes && echo -install_name $rpath/$soname $verstring)'
+    fi
+    output_verbose_link_cmd='$CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
+    ;;
   dgux*)
     case $cc_basename in
       ec++)
@@ -4751,7 +4786,9 @@ EOF
 	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
 	;;
       *) # Darwin 1.3 on
-	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
+	#_LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
+        # testing with twolevel namespaces
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-multiply_defined suppress'
 	;;
       esac
 
@@ -4759,7 +4796,16 @@ EOF
       #        cross-compilation, but unfortunately the echo tests do not
       #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
       #	       `"' quotes if we put them in here... so don't!
-      _LT_AC_TAGVAR(archive_cmds, $1)='$CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
+      BUILD=`gcc -v 2>&1 | grep 'GCC version'`
+      BUILD=`expr "$BUILD" : '.*GCC version \(.*\), based.*'`
+      test -n "$BUILD" || BUILD=0
+      if test "$BUILD" -ge 1173; then
+        export MACOSX_DEPLOYMENT_TARGET=10.2
+        _LT_AC_TAGVAR(archive_cmds, $1)='$CC $(test .$module = .yes && echo -bundle || echo -dynamiclib -single_module) $allow_undefined_flag -o $lib $libobjs $deplibs $linker_flags $(test .$module != .yes && echo -install_name $rpath/$soname $verstring)'
+      else
+        # this may cause problems with some libraries!
+        _LT_AC_TAGVAR(archive_cmds, $1)='$CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs $linker_flags $(test .$module != .yes && echo -install_name $rpath/$soname $verstring)'
+      fi
       # We need to add '_' to the symbols in $export_symbols first
       #_LT_AC_TAGVAR(archive_expsym_cmds, $1)="$_LT_AC_TAGVAR(archive_cmds, $1)"' && strip -s $export_symbols'
       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
Index: admin/ltmain.sh
===================================================================
RCS file: /home/kde/kde-common/admin/ltmain.sh,v
retrieving revision 1.61
diff -d -u -p -r1.61 ltmain.sh
--- admin/ltmain.sh	2 Jun 2002 20:54:46 -0000	1.61
+++ admin/ltmain.sh	5 Mar 2003 05:52:32 -0000
@@ -659,7 +659,20 @@ EOF
       $run $rm "$lobj" "$output_obj"
 
       $show "$command"
-      if $run eval "$command"; then :
+      if $run eval "$command"; then 
+        case $host in
+        *darwin*)
+              BUILD=`gcc -v 2>&1 | grep 'GCC version'`
+              BUILD=`expr "$BUILD" : '.*GCC version \(.*\), based.*'`
+              test -n "$BUILD" || BUILD=0
+              if test "$BUILD" -lt 1173; then
+		 $show "ld -r -d $lobj"
+	         if ld -r -d "$lobj" -o "${lobj}.ld"; then
+		     mv "${lobj}.ld" "$lobj"
+		 fi
+	      fi
+	      ;;
+        esac
       else
 	test -n "$output_obj" && $run $rm $removelist
 	exit 1
@@ -729,7 +742,20 @@ EOF
       command="$command$suppress_output"
       $run $rm "$obj" "$output_obj"
       $show "$command"
-      if $run eval "$command"; then :
+      if $run eval "$command"; then
+        case $host in
+        *darwin*)
+              BUILD=`gcc -v 2>&1 | grep 'GCC version'`
+              BUILD=`expr "$BUILD" : '.*GCC version \(.*\), based.*'`
+              test -n "$BUILD" || BUILD=0
+              if test "$BUILD" -lt 1173; then
+		 $show "ld -r -d $lobj"
+	         if ld -r -d "$lobj" -o "${lobj}.ld"; then
+		     mv "${lobj}.ld" "$lobj"
+		 fi
+	      fi
+	      ;;
+        esac
       else
 	$run $rm $removelist
 	exit 1
@@ -2532,11 +2558,11 @@ EOF
 	eval libname=\"$libname_spec\"
 	;;
       *)
-	if test "$module" = no; then
-	  $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
-	  $echo "$help" 1>&2
-	  exit 1
-	fi
+#	if test "$module" = no; then
+#	  $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
+#	  $echo "$help" 1>&2
+#	  exit 1
+#	fi
 	if test "$need_lib_prefix" != no; then
 	  # Add the "lib" prefix for modules if required
 	  name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
@@ -3321,7 +3347,23 @@ EOF
 	if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
 	  eval cmds=\"$archive_expsym_cmds\"
 	else
+          if test "x$verstring" = "x0.0"; then
+                tmp_verstring=
+          else
+                tmp_verstring="$verstring"
+          fi
+ 	  save_deplibs="$deplibs"
+ 	  for conv in $convenience; do
+            tmp_deplibs=
+            for test_deplib in $deplibs; do
+              if test "$test_deplib" != "$conv"; then
+                tmp_deplibs="$tmp_deplibs $test_deplib"
+              fi
+            done
+            deplibs="$tmp_deplibs"
+ 	  done
 	  eval cmds=\"$archive_cmds\"
+ 	  deplibs="$save_deplibs"
 	fi
 
 	if len=`expr "X$cmds" : ".*"` &&
@@ -3419,7 +3461,12 @@ EOF
 	  if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
 	    eval cmds=\"$archive_expsym_cmds\"
 	  else
-	    eval cmds=\"$archive_cmds\"
+            save_deplibs="$deplibs"
+            for conv in $convenience; do
+              deplibs="${deplibs%$conv*} ${deplibs#*$conv}"
+            done
+            eval cmds=\"$archive_cmds\"
+            deplibs="$save_deplibs"
 	  fi
 
 	  # Append the command to remove the reloadable object files
@@ -3634,6 +3681,14 @@ EOF
 	;;
       esac
 
+      case $host in
+      *darwin*)
+        # Don't allow lazy linking, it breaks C++ global constructors
+        compile_command="$compile_command ${wl}-bind_at_load -undefined suppress -flat_namespace"
+        finalize_command="$finalize_command ${wl}-bind_at_load"
+        ;;
+      esac
+
       compile_command="$compile_command $compile_deplibs"
       finalize_command="$finalize_command $finalize_deplibs"
 
@@ -4024,9 +4079,10 @@ static const void *lt_preloaded_setup() 
 	    # fast_install is set to needless
 	    relink_command=
 	  fi
+          relink_command=
 	else
 	  link_command="$compile_var$compile_command$compile_rpath"
-	  relink_command="$finalize_var$finalize_command$finalize_rpath"
+	  #relink_command="$finalize_var$finalize_command$finalize_rpath"
 	fi
       fi
 
@@ -4549,6 +4605,7 @@ relink_command=\"$relink_command\""
     prev=
     install_type=
     isdir=no
+    bundle=no
     stripme=
     for arg
     do
@@ -4564,6 +4621,9 @@ relink_command=\"$relink_command\""
       -g) prev="-g" ;;
       -m) prev="-m" ;;
       -o) prev="-o" ;;
+      -bundle) 
+        bundle=yes 
+        continue ;;
       -s)
 	stripme=" -s"
 	continue
@@ -4916,6 +4976,13 @@ relink_command=\"$relink_command\""
 	  esac
 	  ;;
 	esac
+	case $host in
+        *darwin*)
+           if [ "x$bundle" = "xyes" ]; then # Put executables into an application bundle
+	     echo $destfile | grep '\.app' >/dev/null 2>&1 || destfile="${destfile}.app/Contents/MacOS/$(basename $destfile)"
+           fi
+           ;;
+        esac
 	$show "$install_prog$stripme $file $destfile"
 	$run eval "$install_prog\$stripme \$file \$destfile" || exit $?
 	test -n "$outputname" && ${rm}r "$tmpdir"
Index: libltdl/ltdl.m4
===================================================================
RCS file: /home/kde/kdelibs/libltdl/ltdl.m4,v
retrieving revision 1.8
diff -d -u -p -r1.8 ltdl.m4
--- libltdl/ltdl.m4	22 May 2002 15:37:48 -0000	1.8
+++ libltdl/ltdl.m4	5 Mar 2003 05:52:33 -0000
@@ -100,6 +100,9 @@ AC_CACHE_CHECK([whether deplibs are load
 	hpux*|irix*)
 	  libltdl_cv_sys_dlopen_deplibs=yes
 	  ;;
+	darwin* | rhapsody*)
+	  libltdl_cv_sys_dlopen_deplibs=yes
+	  ;;
 	osf*)
 	  libltdl_cv_sys_dlopen_deplibs=yes
 	  ;;
