diff -ur globus_common_setup-2.6.orig/configure.in globus_common_setup-2.6/configure.in
--- globus_common_setup-2.6.orig/configure.in	2002-01-10 03:26:32.000000000 +0100
+++ globus_common_setup-2.6/configure.in	2008-10-13 00:09:15.000000000 +0200
@@ -9,10 +9,31 @@
 dnl Initialize the automake rules the last argument
 AM_INIT_AUTOMAKE($GPT_NAME, $GPT_VERSION)
 
+AC_ARG_WITH(tmpdir,
+        AC_HELP_STRING([--with-tmpdir=DIR],
+        [directory for temporary files [[/tmp]]]),
+        [tmpdir="$withval"],
+        [tmpdir=/tmp])
+AC_SUBST(tmpdir)
 
+AC_ARG_WITH(local-tmpdir,
+        AC_HELP_STRING([--with-local-tmpdir=DIR],
+        [local directory for temporary files [[TMPDIR]]]),
+        [local_tmpdir="$withval"],
+        [local_tmpdir='${tmpdir}'])
+AC_SUBST(local_tmpdir)
+
+AC_ARG_WITH(secure-tmpdir,
+        AC_HELP_STRING([--with-secure-tmpdir=DIR],
+        [secure directory for temporary files [[PREFIX/tmp]]]),
+        [secure_tmpdir="$withval"],
+        [secure_tmpdir='${prefix}/tmp'])
+AC_SUBST(secure_tmpdir)
 
 AC_OUTPUT(
         Makefile
+        globus-script-initializer
+        Paths.pm:Paths.in
         pkgdata/Makefile
         pkgdata/pkg_data_src.gpt
 )
diff -ur globus_common_setup-2.6.orig/findshelltools.in globus_common_setup-2.6/findshelltools.in
--- globus_common_setup-2.6.orig/findshelltools.in	2004-09-29 14:52:55.000000000 +0200
+++ globus_common_setup-2.6/findshelltools.in	2008-10-13 00:09:15.000000000 +0200
@@ -1,16 +1,6 @@
 AC_REVISION($Revision: 1.2 $)
 AC_INIT(globus-sh-tools-vars.sh.in)
 
-# checking for the GLOBUS_LOCATION
-
-if test "x$GLOBUS_LOCATION" = "x"; then
-    echo "ERROR Please specify GLOBUS_LOCATION" >&2
-    exit 1
-fi
-
-prefix='$(GLOBUS_LOCATION)'
-exec_prefix='$(GLOBUS_LOCATION)'
-
 if test "x$PERL" = "x"; then
         AC_PATH_PROG(PERL,perl)
 fi
diff -ur globus_common_setup-2.6.orig/globus-script-initializer.in globus_common_setup-2.6/globus-script-initializer.in
--- globus_common_setup-2.6.orig/globus-script-initializer.in	2005-11-29 21:08:58.000000000 +0100
+++ globus_common_setup-2.6/globus-script-initializer.in	2008-10-13 00:09:15.000000000 +0200
@@ -1,49 +1,53 @@
-
-
-exec_prefix=${GLOBUS_LOCATION}
-prefix=$GLOBUS_LOCATION
-sbindir=${exec_prefix}/sbin
-bindir=${exec_prefix}/bin
-libdir=${exec_prefix}/lib
-libexecdir=${exec_prefix}/libexec
-includedir=${exec_prefix}/include
-datadir=${prefix}/share
-sysconfdir=${prefix}/etc
-sharedstatedir=${prefix}/com
-localstatedir=${prefix}/var
+prefix=${GLOBUS_LOCATION:-/usr}
+exec_prefix=${GLOBUS_LOCATION:-/usr}
+bindir=@bindir@
+sbindir=@sbindir@
+libdir=@libdir@
+includedir=@includedir@
+flavorincludedir=@flavorincludedir@
+datadir=@datadir@
+libexecdir=@libexecdir@
+sysconfdir=@sysconfdir@
+sharedstatedir=@sharedstatedir@
+localstatedir=@localstatedir@
+setupdir=@setupdir@
+testdir=@testdir@
+perlmoduledir=@perlmoduledir@
 tmpdir=@tmpdir@
 local_tmpdir=@local_tmpdir@
 secure_tmpdir=@secure_tmpdir@
 
+if [ x$prefix != "x/usr" ]; then
+
 DELIM=
 if [ -n "${LD_LIBRARY_PATH}" ]; then
     DELIM=:
 fi
-LD_LIBRARY_PATH="${GLOBUS_LOCATION}/lib${DELIM}${LD_LIBRARY_PATH}"
+LD_LIBRARY_PATH="${libdir}${DELIM}${LD_LIBRARY_PATH}"
 
 DELIM=
 if [ -n "${DYLD_LIBRARY_PATH}" ]; then
     DELIM=:
 fi
-DYLD_LIBRARY_PATH="${GLOBUS_LOCATION}/lib${DELIM}${DYLD_LIBRARY_PATH}"
+DYLD_LIBRARY_PATH="${libdir}${DELIM}${DYLD_LIBRARY_PATH}"
 
 if [ -z "${LIBPATH}" ]; then
     LIBPATH="/usr/lib:/lib"
 fi
-LIBPATH="${GLOBUS_LOCATION}/lib:${LIBPATH}"
+LIBPATH="${libdir}:${LIBPATH}"
 
 DELIM=
 if [ -n "${SHLIB_PATH}" ]; then
     DELIM=:
 fi
-SHLIB_PATH="${GLOBUS_LOCATION}/lib${DELIM}${SHLIB_PATH}"
+SHLIB_PATH="${libdir}${DELIM}${SHLIB_PATH}"
 
-if [ -d $GLOBUS_LOCATION/lib/sasl ]; then
+if [ -d ${libdir}/sasl ]; then
     DELIM=
     if [ -n "${SASL_PATH}" ]; then
         DELIM=:
     fi
-    SASL_PATH="${GLOBUS_LOCATION}/lib/sasl${DELIM}${SASL_PATH}"
+    SASL_PATH="${libdir}/sasl${DELIM}${SASL_PATH}"
 fi
 
 export LD_LIBRARY_PATH DYLD_LIBRARY_PATH LIBPATH SHLIB_PATH SASL_PATH
@@ -53,7 +57,7 @@
     if [ "X${LD_LIBRARYN32_PATH}" != "X" ]; then
         DELIM=:
     fi
-    LD_LIBRARYN32_PATH="${GLOBUS_LOCATION}/lib${DELIM}${LD_LIBRARYN32_PATH}"
+    LD_LIBRARYN32_PATH="${libdir}${DELIM}${LD_LIBRARYN32_PATH}"
     export LD_LIBRARYN32_PATH
 fi
 
@@ -62,10 +66,19 @@
     if [ "X${LD_LIBRARY64_PATH}" != "X" ]; then
         DELIM=:
     fi
-    LD_LIBRARY64_PATH="${GLOBUS_LOCATION}/lib${DELIM}${LD_LIBRARY64_PATH}"
+    LD_LIBRARY64_PATH="${libdir}${DELIM}${LD_LIBRARY64_PATH}"
     export LD_LIBRARY64_PATH
 fi
 
+DELIM=
+if [ -n "${PERLLIB}" ]; then
+    DELIM=:
+fi
+PERLLIB="${perlmoduledir}${DELIM}${PERLLIB}"
+export PERLLIB
+
+fi
+
 globus_source () {
 
   # Check if file exists and source it
diff -ur globus_common_setup-2.6.orig/Makefile.am globus_common_setup-2.6/Makefile.am
--- globus_common_setup-2.6.orig/Makefile.am	2002-09-24 23:33:53.000000000 +0200
+++ globus_common_setup-2.6/Makefile.am	2008-10-13 00:09:15.000000000 +0200
@@ -3,25 +3,26 @@
 
 setup_SCRIPTS = \
 	findshelltools \
-	setup-tmpdirs \
 	setup-globus-common \
 	setup-globus-common.pl
 
 setup_DATA = \
-        globus-script-initializer.in \
-        globus-sh-tools-vars.sh.in \
-        Paths.in 
+        globus-sh-tools-vars.sh.in
+
+libexec_SCRIPTS = globus-script-initializer
+
+globusperldir = $(perlmoduledir)/Globus/Core
+globusperl_DATA = Paths.pm
+
+findshelltools: findshelltools.in
+	autoconf -o findshelltools findshelltools.in
 
 SUBDIRS = pkgdata
 
 EXTRA_DIST = \
 	findshelltools \
 	findshelltools.in \
-	setup-tmpdirs \
-	setup-tmpdirs.in \
-        globus-script-initializer.in \
-        globus-sh-tools-vars.sh.in \
-        Paths.in \
+	globus-sh-tools-vars.sh.in \
 	setup-globus-common \
 	setup-globus-common.pl
 
diff -ur globus_common_setup-2.6.orig/Paths.in globus_common_setup-2.6/Paths.in
--- globus_common_setup-2.6.orig/Paths.in	2002-09-24 23:33:53.000000000 +0200
+++ globus_common_setup-2.6/Paths.in	2008-10-13 00:09:15.000000000 +0200
@@ -4,26 +4,38 @@
 
 @ISA = qw(Exporter);
 
-@EXPORT = qw($exec_prefix $prefix
-             $sbindir $bindir
-	     $libdir $libexecdir $includedir
-	     $datadir $sysconfdir $sharedstatedir
+@EXPORT = qw($prefix $exec_prefix
+	     $bindir $sbindir $libdir
+	     $includedir $flavorincludedir
+	     $datadir $libexecdir
+	     $sysconfdir $sharedstatedir
 	     $localstatedir
+	     $setupdir $testdir
+	     $perlmoduledir
 	     $tmpdir
 	     $local_tmpdir
 	     $secure_tmpdir);
 
-$exec_prefix=$ENV{GLOBUS_LOCATION};
+my $PACKAGE = "\$PACKAGE";
+my $GLOBUS_FLAVOR_NAME = "\$GLOBUS_FLAVOR_NAME";
+
 $prefix=$ENV{GLOBUS_LOCATION};
-$sbindir="${exec_prefix}/sbin";
-$bindir="${exec_prefix}/bin";
-$libdir="${exec_prefix}/lib";
-$libexecdir="${exec_prefix}/libexec";
-$includedir="${exec_prefix}/include";
-$datadir="${prefix}/share";
-$sysconfdir="${prefix}/etc";
-$sharedstatedir="${prefix}/com";
-$localstatedir="${prefix}/var";
+$prefix="/usr" if (!defined $prefix);
+$exec_prefix=$ENV{GLOBUS_LOCATION};
+$exec_prefix="/usr" if (!defined $exec_prefix);
+$bindir="@bindir@";
+$sbindir="@sbindir@";
+$libdir="@libdir@";
+$includedir="@includedir@";
+$flavorincludedir="@flavorincludedir@";
+$datadir="@datadir@";
+$libexecdir="@libexecdir@";
+$sysconfdir="@sysconfdir@";
+$sharedstatedir="@sharedstatedir@";
+$localstatedir="@localstatedir@";
+$setupdir="@setupdir@";
+$testdir="@testdir@";
+$perlmoduledir="@perlmoduledir@";
 $tmpdir="@tmpdir@";
 $local_tmpdir="@local_tmpdir@";
 $secure_tmpdir="@secure_tmpdir@";
diff -ur globus_common_setup-2.6.orig/setup-globus-common globus_common_setup-2.6/setup-globus-common
--- globus_common_setup-2.6.orig/setup-globus-common	2001-06-21 00:24:26.000000000 +0200
+++ globus_common_setup-2.6/setup-globus-common	2008-10-13 00:09:15.000000000 +0200
@@ -1,3 +1,8 @@
 #! /bin/sh
 
-perl $GLOBUS_LOCATION/setup/globus/setup-globus-common.pl
+if test -f "${GLOBUS_LOCATION:-/usr}/share/globus/globus-script-initializer" ; then
+    . ${GLOBUS_LOCATION:-/usr}/share/globus/globus-script-initializer
+else
+    . ${GLOBUS_LOCATION:-/usr}/libexec/globus-script-initializer
+fi
+perl ${setupdir}/setup-globus-common.pl
diff -ur globus_common_setup-2.6.orig/setup-globus-common.pl globus_common_setup-2.6/setup-globus-common.pl
--- globus_common_setup-2.6.orig/setup-globus-common.pl	2006-01-19 06:54:11.000000000 +0100
+++ globus_common_setup-2.6/setup-globus-common.pl	2008-10-13 00:09:15.000000000 +0200
@@ -19,13 +19,7 @@
 
 if (!defined($gpath))
 {
-  $gpath = $ENV{GLOBUS_LOCATION};
-
-}
-
-if (!defined($gpath))
-{
-   die "GPT_LOCATION or GLOBUS_LOCATION needs to be set before running this script"
+  $gpath = "/usr";
 }
 
 @INC = (@INC, "$gpath/lib/perl");
@@ -34,37 +28,25 @@
 
 my $metadata = new Grid::GPT::Setup(package_name => "globus_common_setup");
 
-my $globusdir = $ENV{GLOBUS_LOCATION};
-
-if((!defined($globusdir)))
-{
-    die "GLOBUS_LOCATION needs to be set before running this script"
-}
-
-my $setupdir = "$globusdir/setup/globus/";
+require Globus::Core::Paths;
+my $setupdir = $Globus::Core::Paths::setupdir;
+my $libexecdir = $Globus::Core::Paths::libexecdir;
+my $bindir = $Globus::Core::Paths::bindir;
 
 print "creating globus-sh-tools-vars.sh\n";
 my $result = `$setupdir/findshelltools`;
 
-print "creating globus-script-initializer\n";
-print "creating Globus::Core::Paths\n";
-
-$result = `$setupdir/setup-tmpdirs`;
-
-for my $setupfile ('globus-script-initializer', 'globus-sh-tools-vars.sh')
+for my $setupfile ('globus-sh-tools-vars.sh')
 {
-    $result = system("cp $setupdir/$setupfile $globusdir/libexec");
-    $result = system("chmod 0755 $globusdir/libexec/$setupfile");
-
+    $result = system("cp $setupdir/$setupfile $libexecdir/$setupfile");
+    $result = system("chmod 0644 $libexecdir/$setupfile");
 }
 
-system("mkdir -p $globusdir/lib/perl/Globus/Core");
-system("cp $setupdir/Paths.pm $globusdir/lib/perl/Globus/Core/");
-system("chmod 0644 $globusdir/lib/perl/Globus/Core/Paths.pm");
+system("rm -f config.log config.status");
 
 print "checking globus-hostname\n";
 
-my $hostname = `$globusdir/bin/globus-hostname`;
+my $hostname = `$bindir/globus-hostname`;
 
 $hostname =~ s/\w//g; #strip whitespace
 
