diff -c -r config-scripts.old/cups-compiler.m4 config-scripts/cups-compiler.m4
*** config-scripts.old/cups-compiler.m4	2006-11-22 11:07:41.000000000 +0100
--- config-scripts/cups-compiler.m4	2006-11-22 11:28:42.000000000 +0100
***************
*** 129,134 ****
--- 129,186 ----
  	fi
  
  	case "$uname" in
+ 		HP-UX*)
+ 			if test "x$enable_32bit" = xyes; then
+ 				# Build 32-bit libraries, 64-bit base...
+ 				if test -z "$with_arch32flags"; then
+ 					ARCH32FLAGS="-milp32"
+ 				else
+ 					ARCH32FLAGS="$with_arch32flags"
+ 				fi
+ 				INSTALL32="install32bit"
+ 				LIB32CUPS="32bit/libcups.so.2"
+ 				LIB32CUPSIMAGE="32bit/libcupsimage.so.2"
+ 				LIB32DIR="$exec_prefix/lib"
+ 				if test -d /usr/lib/hpux32; then
+ 					LIB32DIR="${LIB32DIR}/hpux32"
+ 				fi
+ 				UNINSTALL32="uninstall32bit"
+ 
+ 				if test -z "$with_archflags"; then
+ 					if test -z "$with_arch64flags"; then
+ 						ARCHFLAGS="-mlp64"
+ 					else
+ 						ARCHFLAGS="$with_arch64flags"
+ 					fi
+ 				fi
+ 			fi
+ 
+ 			if test "x$enable_64bit" = xyes; then
+ 				# Build 64-bit libraries, 32-bit base...
+ 				if test -z "$with_arch64flags"; then
+ 					ARCH64FLAGS="-mlp64"
+ 				else
+ 					ARCH64FLAGS="$with_arch64flags"
+ 				fi
+ 				INSTALL64="install64bit"
+ 				LIB64CUPS="64bit/libcups.so.2"
+ 				LIB64CUPSIMAGE="64bit/libcupsimage.so.2"
+ 				LIB64DIR="$exec_prefix/lib"
+ 				if test -d /usr/lib/hpux64; then
+ 					LIB64DIR="${LIB64DIR}/hpux64"
+ 				fi
+ 				UNINSTALL64="uninstall64bit"
+ 
+ 				if test -z "$with_archflags"; then
+ 					if test -z "$with_arch32flags"; then
+ 						ARCHFLAGS="-milp32"
+ 					else
+ 						ARCHFLAGS="$with_arch32flags"
+ 					fi
+ 				fi
+ 			fi
+ 			;;
+ 
  		IRIX)
  			if test "x$enable_32bit" = xyes; then
  				# Build 32-bit libraries, 64-bit base...
diff -c -r config-scripts.old/cups-opsys.m4 config-scripts/cups-opsys.m4
*** config-scripts.old/cups-opsys.m4	2006-11-22 11:08:15.000000000 +0100
--- config-scripts/cups-opsys.m4	2006-11-22 11:09:21.000000000 +0100
***************
*** 22,30 ****
  dnl         WWW: http://www.cups.org
  dnl
  
! dnl Get the operating system and version number...
  uname=`uname`
  uversion=`uname -r | sed -e '1,$s/^[[^0-9]]*\([[0-9]]*\)\.\([[0-9]]*\).*/\1\2/'`
  
  case "$uname" in
  	GNU* | GNU/*)
--- 22,31 ----
  dnl         WWW: http://www.cups.org
  dnl
  
! dnl Get the operating system, version number and arch ...
  uname=`uname`
  uversion=`uname -r | sed -e '1,$s/^[[^0-9]]*\([[0-9]]*\)\.\([[0-9]]*\).*/\1\2/'`
+ uarch=`uname -m`
  
  case "$uname" in
  	GNU* | GNU/*)
diff -c -r config-scripts.old/cups-sharedlibs.m4 config-scripts/cups-sharedlibs.m4
*** config-scripts.old/cups-sharedlibs.m4	2006-11-22 11:07:48.000000000 +0100
--- config-scripts/cups-sharedlibs.m4	2006-11-22 11:25:00.000000000 +0100
***************
*** 36,45 ****
  			DSOFLAGS="$DSOFLAGS -Wl,-h,\`basename \$@\` -G \$(OPTIM)"
  			;;
  		HP-UX*)
! 			LIBCUPS="libcups.sl.2"
! 			LIBCUPSIMAGE="libcupsimage.sl.2"
! 			DSO="\$(LD)"
! 			DSOFLAGS="$DSOFLAGS -b -z +h \`basename \$@\`"
  			;;
  		IRIX)
  			LIBCUPS="libcups.so.2"
--- 36,55 ----
  			DSOFLAGS="$DSOFLAGS -Wl,-h,\`basename \$@\` -G \$(OPTIM)"
  			;;
  		HP-UX*)
! 			case "$uarch" in
! 				ia64)
! 					LIBCUPS="libcups.so.2"
! 					LIBCUPSIMAGE="libcupsimage.so.2"
! 					DSO="\$(CC)"
! 					DSOFLAGS="$DSOFLAGS -Wl,-b,-z,+h,\`basename \$@\`"
! 					;;
! 				*)
! 					LIBCUPS="libcups.sl.2"
! 					LIBCUPSIMAGE="libcupsimage.sl.2"
! 					DSO="\$(LD)"
! 					DSOFLAGS="$DSOFLAGS -b -z +h \`basename \$@\`"
! 					;;
! 			esac
  			;;
  		IRIX)
  			LIBCUPS="libcups.so.2"
***************
*** 126,134 ****
  	case $uname in
                  HP-UX*)
  			# HP-UX needs the path, even for /usr/lib...
!                 	DSOFLAGS="+s +b $libdir $DSOFLAGS"
!                 	DSO32FLAGS="+s +b $LIB32DIR $DSO32FLAGS"
!                 	DSO64FLAGS="+s +b $LIB64DIR $DSO64FLAGS"
                  	LDFLAGS="$LDFLAGS -Wl,+s,+b,$libdir"
                  	EXPORT_LDFLAGS="-Wl,+s,+b,$libdir"
  			;;
--- 136,153 ----
  	case $uname in
                  HP-UX*)
  			# HP-UX needs the path, even for /usr/lib...
! 			case "$uarch" in
! 				ia64)
! 					DSOFLAGS="-Wl,+s,+b,$libdir $DSOFLAGS"
! 					DSO32FLAGS="-Wl,+s,+b,$LIB32DIR $DSO32FLAGS"
! 					DSO64FLAGS="-Wl,+s,+b,$LIB64DIR $DSO64FLAGS"
! 					;;
! 				*)
!                 			DSOFLAGS="+s +b $libdir $DSOFLAGS"
!                 			DSO32FLAGS="+s +b $LIB32DIR $DSO32FLAGS"
!                 			DSO64FLAGS="+s +b $LIB64DIR $DSO64FLAGS"
! 					;;
! 			esac
                  	LDFLAGS="$LDFLAGS -Wl,+s,+b,$libdir"
                  	EXPORT_LDFLAGS="-Wl,+s,+b,$libdir"
  			;;
