Index: kde-2.1/kdelibs-2.1/configure
diff -u kde-2.1/kdelibs-2.1/configure:1.1.1.1 kde-2.1/kdelibs-2.1/configure:1.2
--- kde-2.1/kdelibs-2.1/configure:1.1.1.1	Tue Feb 27 10:56:08 2001
+++ kde-2.1/kdelibs-2.1/configure	Wed Feb 28 13:21:37 2001
@@ -4064,6 +4064,15 @@
 	data2 = malloc(2 * pagesize);
 	if (!data2)
 		exit(1);
+#ifdef _AIX
+        /*
+         *   We want to ensure data2 is not in the process private segment,
+         *   so issue mmap MAP_VARIABLE to get the first available address
+         *   in this process.
+         */
+        data2 = mmap(data2, pagesize, PROT_READ | PROT_WRITE,
+                     MAP_PRIVATE | MAP_VARIABLE, fd, 0L);
+#endif
 	data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
 	if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
 	    MAP_PRIVATE | MAP_FIXED, fd, 0L))
@@ -4093,7 +4102,7 @@
 }
 
 EOF
-if { (eval echo configure:4097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (XPG_SUS_ENV=ON ./conftest; exit) 2>/dev/null
 then
   ac_cv_func_mmap_fixed_mapped=yes
 else
Index: kde-2.1/kdelibs-2.1/admin/ltmain.sh
diff -u kde-2.1/kdelibs-2.1/admin/ltmain.sh:1.1.1.1 kde-2.1/kdelibs-2.1/admin/ltmain.sh:1.2
--- kde-2.1/kdelibs-2.1/admin/ltmain.sh:1.1.1.1	Tue Feb 27 10:57:23 2001
+++ kde-2.1/kdelibs-2.1/admin/ltmain.sh	Wed Feb 28 13:21:38 2001
@@ -2868,6 +2868,8 @@
 	     test -n "$hardcode_libdirs"; then
 	    libdir="$hardcode_libdirs"
 	    eval dep_rpath=\"$hardcode_libdir_flag_spec\"
+	  else
+	    dep_rpath="${wl}-bnolibpath"
 	  fi
 	  if test -n "$runpath_var" && test -n "$perm_rpath"; then
 	    # We should set the runpath_var.
@@ -3274,6 +3276,8 @@
 	 test -n "$hardcode_libdirs"; then
 	libdir="$hardcode_libdirs"
 	eval rpath=\" $hardcode_libdir_flag_spec\"
+      else
+        dep_rpath=" ${wl}-bnolibpath"
       fi
       compile_rpath="$rpath"
 
@@ -3310,6 +3314,8 @@
 	 test -n "$hardcode_libdirs"; then
 	libdir="$hardcode_libdirs"
 	eval rpath=\" $hardcode_libdir_flag_spec\"
+      else
+        dep_rpath=" ${wl}-bnolibpath"
       fi
       finalize_rpath="$rpath"
 
@@ -3502,7 +3508,9 @@
       # AIX runtime linking requires linking programs with -Wl,-brtl and libs with -Wl,-G
       case "$host" in
         *-*-aix4*) compile_command="$compile_command $wl-brtl"
-                   finalize_command="$finalize_command $wl-brtl" ;;
+                   compile_command=`$echo "X$compile_command" | $Xsed -e "s/\$CC/\$CC $wl-bnolibpath/1"`
+                   finalize_command="$finalize_command $wl-brtl"
+                   finalize_command=`$echo "X$finalize_command" | $Xsed -e "s/\$CC/\$CC $wl-bnolibpath/1"` ;;
       esac
 
       if test $need_relink = no || test "$build_libtool_libs" != yes; then
@@ -4393,10 +4401,18 @@
 	      esac
 	    fi
 	    libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
-	    if test -n "$libdir" && test ! -f "$libfile"; then
-	      $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
-	      finalize=no
-	    fi
+            # Make sure we look in the destination dir as well as the final dir
+            if test -z "$DESTDIR"; then
+	      if test -n "$libdir" && test ! -f "$libfile"; then
+		$echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
+		finalize=no
+	      fi
+            else
+              if test -n "$libdir" && test ! -f "$libfile" && test -n "$DESTDIR/$libdir" && test ! -f "$DESTDIR/$libfile"; then
+                $echo "$modename: warning: \`$lib' has not been installed in \`$libdir' or \`\$DESTDIR/$libdir'" 1>&2
+                finalize=no
+              fi
+            fi
 	  done
 
 	  relink_command=
@@ -4421,6 +4437,8 @@
 	      outputname="$tmpdir/$file"
 	      # Replace the output file specification.
 	      relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
+              # Make sure we look in the destination dir as well as the final dir
+              test -z "$DESTDIR" || relink_command=`$echo "X$relink_command" | $Xsed -e 's%-L'"$libdir"'%-L'"$libdir"' -L'"$DESTDIR/$libdir"'%g'`
 
 	      $show "$relink_command"
 	      if $run eval "$relink_command"; then :
Index: kde-2.1/kdelibs-2.1/arts/artsc/artscbackend.cc
diff -u kde-2.1/kdelibs-2.1/arts/artsc/artscbackend.cc:1.1.1.1 kde-2.1/kdelibs-2.1/arts/artsc/artscbackend.cc:1.2
--- kde-2.1/kdelibs-2.1/arts/artsc/artscbackend.cc:1.1.1.1	Tue Feb 27 10:56:08 2001
+++ kde-2.1/kdelibs-2.1/arts/artsc/artscbackend.cc	Wed Feb 28 13:21:38 2001
@@ -30,7 +30,13 @@
 #include <unistd.h>
 #include <fcntl.h>
 #include <iostream>
+#if defined(_AIX) && !defined(_AIX51)
+#define exception _exception
+#endif
 #include <math.h>
+#if defined(_AIX) && !defined(_AIX51)
+#undef exception
+#endif
 #include <queue>
 #include <assert.h>
 
Index: kde-2.1/kdelibs-2.1/arts/flow/convert.cc
diff -u kde-2.1/kdelibs-2.1/arts/flow/convert.cc:1.1.1.1 kde-2.1/kdelibs-2.1/arts/flow/convert.cc:1.2
--- kde-2.1/kdelibs-2.1/arts/flow/convert.cc:1.1.1.1	Tue Feb 27 10:56:10 2001
+++ kde-2.1/kdelibs-2.1/arts/flow/convert.cc	Wed Feb 28 13:21:38 2001
@@ -21,7 +21,13 @@
     */
 
 #include "convert.h"
+#if defined(_AIX) && !defined(_AIX51)
+#  define exception _exception
+#endif
 #include <math.h>
+#if defined(_AIX) && !defined(_AIX51)
+#  undef exception
+#endif
 #include <string.h>
 #include <assert.h>
 #include <config.h>
Index: kde-2.1/kdelibs-2.1/arts/flow/stereofftscope_impl.cc
diff -u kde-2.1/kdelibs-2.1/arts/flow/stereofftscope_impl.cc:1.1.1.1 kde-2.1/kdelibs-2.1/arts/flow/stereofftscope_impl.cc:1.2
--- kde-2.1/kdelibs-2.1/arts/flow/stereofftscope_impl.cc:1.1.1.1	Tue Feb 27 10:56:10 2001
+++ kde-2.1/kdelibs-2.1/arts/flow/stereofftscope_impl.cc	Wed Feb 28 13:21:38 2001
@@ -23,7 +23,13 @@
 #include "artsflow.h"
 #include "fft.h"
 #include "stdsynthmodule.h"
+#if defined(_AIX) && !defined(_AIX51)
+#define exception _exception
+#endif
 #include <math.h>
+#if defined(_AIX) && !defined(_AIX51)
+#undef exception
+#endif
 #include <iostream>
 
 using namespace std;
Index: kde-2.1/kdelibs-2.1/arts/flow/stereovolumecontrol_impl.cc
diff -u kde-2.1/kdelibs-2.1/arts/flow/stereovolumecontrol_impl.cc:1.1.1.1 kde-2.1/kdelibs-2.1/arts/flow/stereovolumecontrol_impl.cc:1.2
--- kde-2.1/kdelibs-2.1/arts/flow/stereovolumecontrol_impl.cc:1.1.1.1	Tue Feb 27 10:56:10 2001
+++ kde-2.1/kdelibs-2.1/arts/flow/stereovolumecontrol_impl.cc	Wed Feb 28 13:21:38 2001
@@ -20,7 +20,13 @@
 
     */
 
+#if defined(_AIX) && !defined(_AIX51)
+#define exception _exception
+#endif
 #include <math.h>
+#if defined(_AIX) && !defined(_AIX51)
+#undef exception
+#endif
 #include "artsflow.h"
 #include "stdsynthmodule.h"
 
Index: kde-2.1/kdelibs-2.1/arts/flow/synth_frequency_impl.cc
diff -u kde-2.1/kdelibs-2.1/arts/flow/synth_frequency_impl.cc:1.1.1.1 kde-2.1/kdelibs-2.1/arts/flow/synth_frequency_impl.cc:1.2
--- kde-2.1/kdelibs-2.1/arts/flow/synth_frequency_impl.cc:1.1.1.1	Tue Feb 27 10:56:10 2001
+++ kde-2.1/kdelibs-2.1/arts/flow/synth_frequency_impl.cc	Wed Feb 28 13:21:39 2001
@@ -22,7 +22,13 @@
 
 #include "artsflow.h"
 #include "stdsynthmodule.h"
+#if defined(_AIX) && !defined(_AIX51)
+#define exception _exception
+#endif
 #include <math.h>
+#if defined(_AIX) && !defined(_AIX51)
+#undef exception
+#endif
 #include <stdio.h>
 
 using namespace Arts;
Index: kde-2.1/kdelibs-2.1/arts/flow/synth_wave_sin_impl.cc
diff -u kde-2.1/kdelibs-2.1/arts/flow/synth_wave_sin_impl.cc:1.1.1.1 kde-2.1/kdelibs-2.1/arts/flow/synth_wave_sin_impl.cc:1.2
--- kde-2.1/kdelibs-2.1/arts/flow/synth_wave_sin_impl.cc:1.1.1.1	Tue Feb 27 10:56:10 2001
+++ kde-2.1/kdelibs-2.1/arts/flow/synth_wave_sin_impl.cc	Wed Feb 28 13:21:39 2001
@@ -22,7 +22,13 @@
 
 #include "artsflow.h"
 #include "stdsynthmodule.h"
+#if defined(_AIX) && !defined(_AIX51)
+#define exception _exception
+#endif
 #include <math.h>
+#if defined(_AIX) && !defined(_AIX51)
+#undef exception
+#endif
 
 using namespace Arts;
 
Index: kde-2.1/kdelibs-2.1/arts/mcop/startupmanager.cc
diff -u kde-2.1/kdelibs-2.1/arts/mcop/startupmanager.cc:1.1.1.1 kde-2.1/kdelibs-2.1/arts/mcop/startupmanager.cc:1.2
--- kde-2.1/kdelibs-2.1/arts/mcop/startupmanager.cc:1.1.1.1	Tue Feb 27 10:56:12 2001
+++ kde-2.1/kdelibs-2.1/arts/mcop/startupmanager.cc	Wed Feb 28 13:21:39 2001
@@ -38,6 +38,11 @@
 	StartupManager::add(this);
 }
 
+void StartupClass::startup()
+{
+        // shutdown is optional, startup is mandatory
+}
+
 void StartupClass::shutdown()
 {
 	// shutdown is optional, startup is mandatory
Index: kde-2.1/kdelibs-2.1/arts/mcop/startupmanager.h
diff -u kde-2.1/kdelibs-2.1/arts/mcop/startupmanager.h:1.1.1.1 kde-2.1/kdelibs-2.1/arts/mcop/startupmanager.h:1.2
--- kde-2.1/kdelibs-2.1/arts/mcop/startupmanager.h:1.1.1.1	Tue Feb 27 10:56:12 2001
+++ kde-2.1/kdelibs-2.1/arts/mcop/startupmanager.h	Wed Feb 28 13:21:39 2001
@@ -40,7 +40,7 @@
 class StartupClass {
 public:
 	StartupClass();
-	virtual void startup() = 0;
+	virtual void startup();
 	virtual void shutdown();
 };
 
Index: kde-2.1/kdelibs-2.1/arts/qtmcop/Makefile.am
diff -u kde-2.1/kdelibs-2.1/arts/qtmcop/Makefile.am:1.1.1.1 kde-2.1/kdelibs-2.1/arts/qtmcop/Makefile.am:1.2
--- kde-2.1/kdelibs-2.1/arts/qtmcop/Makefile.am:1.1.1.1	Tue Feb 27 10:56:13 2001
+++ kde-2.1/kdelibs-2.1/arts/qtmcop/Makefile.am	Wed Feb 28 13:21:39 2001
@@ -5,7 +5,7 @@
 
 libqtmcop_la_SOURCES = qiomanager.cc
 libqtmcop_la_LIBADD = $(top_builddir)/arts/mcop/libmcop.la $(LIB_QT)
-libqtmcop_la_LDFLAGS = -no-undefined $(QT_LDFLAGS) $(X_LDFLAGS) $(USER_LDFLAGS)
+libqtmcop_la_LDFLAGS = $(KDE_RPATH) -no-undefined $(QT_LDFLAGS) $(X_LDFLAGS) $(USER_LDFLAGS)
 
 METASOURCES = qiomanager.moc
 
Index: kde-2.1/kdelibs-2.1/dcop/Makefile.am
diff -u kde-2.1/kdelibs-2.1/dcop/Makefile.am:1.1.1.1 kde-2.1/kdelibs-2.1/dcop/Makefile.am:1.2
--- kde-2.1/kdelibs-2.1/dcop/Makefile.am:1.1.1.1	Tue Feb 27 10:56:14 2001
+++ kde-2.1/kdelibs-2.1/dcop/Makefile.am	Wed Feb 28 13:21:39 2001
@@ -33,7 +33,7 @@
 lib_LTLIBRARIES  = libDCOP.la dcopserver.la
 #LIB_QT already includes LIBSM (and thereby -lSM -lICE)
 libDCOP_la_LIBADD = $(LIB_QT)
-libDCOP_la_LDFLAGS = -version-info 1:0 $(all_libraries) -no-undefined
+libDCOP_la_LDFLAGS = $(KDE_RPATH) -version-info 1:0 $(all_libraries) -no-undefined
 
 include_HEADERS = dcopclient.h dcopobject.h dcopstub.h dcopref.h
 noinst_HEADERS = version.h dcopglobal.h dcopserver.h dcop-doc.h testdcop.h dcopsignals.h
Index: kde-2.1/kdelibs-2.1/kio/global.cpp
diff -u kde-2.1/kdelibs-2.1/kio/global.cpp:1.1.1.1 kde-2.1/kdelibs-2.1/kio/global.cpp:1.2
--- kde-2.1/kdelibs-2.1/kio/global.cpp:1.1.1.1	Tue Feb 27 10:56:40 2001
+++ kde-2.1/kdelibs-2.1/kio/global.cpp	Wed Feb 28 13:21:39 2001
@@ -387,8 +387,29 @@
 #include <fstab.h>
 #endif
 #if defined(_AIX)
+#define vmount _vmount
 #include <sys/mntctl.h>
 #include <sys/vmount.h>
+#undef vmount
+struct vmount {
+        uint    vmt_revision;   /* I revision level, currently 1        */
+        uint    vmt_length;     /* I total length of structure and data */
+        fsid_t  vmt_fsid;       /* O id of file system                  */
+        int     vmt_vfsnumber;  /* O unique mount id of file system     */
+        uint    vmt_time;       /* O time of mount                      */
+        uint    vmt_timepad;    /* O (in future, time is 2 longs)       */
+        int     vmt_flags;      /* I general mount flags                */
+                                /* O MNT_REMOTE is output only          */
+        int     vmt_gfstype;    /* I type of gfs, see MNT_XXX above     */
+        struct _vmt_data {
+                short vmt_off;  /* I offset of data, word aligned       */
+                short vmt_size; /* I actual size of data in bytes       */
+        } vmt_data[VMT_LASTINDEX + 1];
+        /*
+         * the variable length data goes here, starting at word (32 bit)
+         * boundaries.
+         */
+};
 #include <sys/vfs.h>
 /* AIX does not prototype mntctl anywhere that I can find */
 #ifndef mntctl
