summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwtchang%redhat.com <devnull@localhost>2005-11-11 22:32:49 +0000
committerwtchang%redhat.com <devnull@localhost>2005-11-11 22:32:49 +0000
commit560445bf10752b23aef82cb505aa0e09a1b5e525 (patch)
tree315a3707d0815169509694a39784ed4e0e4e2f04
parent97ee09a9201d9c6881ac2daac5aca240735f93e0 (diff)
downloadnspr-hg-560445bf10752b23aef82cb505aa0e09a1b5e525.tar.gz
Bugzilla Bug 312199: HP-UX IPF (Itanium) changes contributed by Grace Lu
of HP: use .so as shared library suffix, link shared libraries with +b $ORIGIN. r=wtc,darin. Modified Files: configure configure.in _hpux.h Tag: NSPRPUB_PRE_4_2_CLIENT_BRANCH
-rwxr-xr-xconfigure63
-rw-r--r--configure.in13
-rw-r--r--pr/include/md/_hpux.h7
3 files changed, 51 insertions, 32 deletions
diff --git a/configure b/configure
index 35e9cbba..487dc6ef 100755
--- a/configure
+++ b/configure
@@ -3465,10 +3465,6 @@ EOF
#define _HPUX_SOURCE 1
EOF
- cat >> confdefs.h <<\EOF
-#define hppa 1
-EOF
-
# OSF1 and HPUX report the POLLHUP event for a socket when the
# shutdown(SHUT_WR) operation is called for the remote end, even though
# the socket is still writeable. Use select(), instead of poll(), to
@@ -3481,10 +3477,21 @@ EOF
#define _USE_BIG_FDS 1
EOF
- DLL_SUFFIX=sl
DSO_LDOPTS='-b +h $(notdir $@)'
PR_MD_CSRCS=hpux.c
- if test "$OS_TEST" != "ia64"; then
+ if test "$OS_TEST" = "ia64"; then
+ DLL_SUFFIX=so
+ DSO_LDOPTS="$DSO_LDOPTS +b '\$\$ORIGIN'"
+ CPU_ARCH_TAG=_$OS_TEST
+ if test -z "$USE_64"; then
+ COMPILER_TAG=_32
+ fi
+ else
+ cat >> confdefs.h <<\EOF
+#define hppa 1
+EOF
+
+ DLL_SUFFIX=sl
PR_MD_ASFILES=os_HPUX.s
fi
if test -n "$USE_64"; then
@@ -4393,17 +4400,17 @@ EOF
_OPTIMIZE_FLAGS="$_OPTIMIZE_FLAGS -Olimit 4000"
ac_safe=`echo "machine/builtins.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for machine/builtins.h""... $ac_c" 1>&6
-echo "configure:4397: checking for machine/builtins.h" >&5
+echo "configure:4404: checking for machine/builtins.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4402 "configure"
+#line 4409 "configure"
#include "confdefs.h"
#include <machine/builtins.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4407: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4414: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -4965,7 +4972,7 @@ case $target in
;;
*)
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:4969: checking for dlopen in -ldl" >&5
+echo "configure:4976: checking for dlopen in -ldl" >&5
ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4973,7 +4980,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4977 "configure"
+#line 4984 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -4984,7 +4991,7 @@ int main() {
dlopen()
; return 0; }
EOF
-if { (eval echo configure:4988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -5001,17 +5008,17 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
-echo "configure:5005: checking for dlfcn.h" >&5
+echo "configure:5012: checking for dlfcn.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5010 "configure"
+#line 5017 "configure"
#include "confdefs.h"
#include <dlfcn.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5015: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -5044,13 +5051,13 @@ esac
if test $ac_cv_prog_gcc = yes; then
echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
-echo "configure:5048: checking whether ${CC-cc} needs -traditional" >&5
+echo "configure:5055: checking whether ${CC-cc} needs -traditional" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_pattern="Autoconf.*'x'"
cat > conftest.$ac_ext <<EOF
-#line 5054 "configure"
+#line 5061 "configure"
#include "confdefs.h"
#include <sgtty.h>
Autoconf TIOCGETP
@@ -5068,7 +5075,7 @@ rm -f conftest*
if test $ac_cv_prog_gcc_traditional = no; then
cat > conftest.$ac_ext <<EOF
-#line 5072 "configure"
+#line 5079 "configure"
#include "confdefs.h"
#include <termio.h>
Autoconf TCGETA
@@ -5092,12 +5099,12 @@ fi
for ac_func in lchown strerror
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5096: checking for $ac_func" >&5
+echo "configure:5103: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5101 "configure"
+#line 5108 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -5120,7 +5127,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:5124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -5161,7 +5168,7 @@ hpux*)
if test -z "$GNU_CC"; then
echo $ac_n "checking for +Olit support""... $ac_c" 1>&6
-echo "configure:5165: checking for +Olit support" >&5
+echo "configure:5172: checking for +Olit support" >&5
if eval "test \"`echo '$''{'ac_cv_hpux_usable_olit_option'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -5200,7 +5207,7 @@ darwin*)
*)
echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
-echo "configure:5204: checking for pthread_create in -lpthreads" >&5
+echo "configure:5211: checking for pthread_create in -lpthreads" >&5
echo "
#include <pthread.h>
void *foo(void *v) { return v; }
@@ -5222,7 +5229,7 @@ echo "
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
-echo "configure:5226: checking for pthread_create in -lpthread" >&5
+echo "configure:5233: checking for pthread_create in -lpthread" >&5
echo "
#include <pthread.h>
void *foo(void *v) { return v; }
@@ -5244,7 +5251,7 @@ echo "
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
-echo "configure:5248: checking for pthread_create in -lc_r" >&5
+echo "configure:5255: checking for pthread_create in -lc_r" >&5
echo "
#include <pthread.h>
void *foo(void *v) { return v; }
@@ -5266,7 +5273,7 @@ echo "
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6
-echo "configure:5270: checking for pthread_create in -lc" >&5
+echo "configure:5277: checking for pthread_create in -lc" >&5
echo "
#include <pthread.h>
void *foo(void *v) { return v; }
@@ -5420,7 +5427,7 @@ if test -n "$USE_PTHREADS"; then
rm -f conftest*
ac_cv_have_dash_pthread=no
echo $ac_n "checking whether ${CC-cc} accepts -pthread""... $ac_c" 1>&6
-echo "configure:5424: checking whether ${CC-cc} accepts -pthread" >&5
+echo "configure:5431: checking whether ${CC-cc} accepts -pthread" >&5
echo 'int main() { return 0; }' | cat > conftest.c
${CC-cc} -pthread -o conftest conftest.c > conftest.out 2>&1
if test $? -eq 0; then
@@ -5443,7 +5450,7 @@ echo "configure:5424: checking whether ${CC-cc} accepts -pthread" >&5
ac_cv_have_dash_pthreads=no
if test "$ac_cv_have_dash_pthread" = "no"; then
echo $ac_n "checking whether ${CC-cc} accepts -pthreads""... $ac_c" 1>&6
-echo "configure:5447: checking whether ${CC-cc} accepts -pthreads" >&5
+echo "configure:5454: checking whether ${CC-cc} accepts -pthreads" >&5
echo 'int main() { return 0; }' | cat > conftest.c
${CC-cc} -pthreads -o conftest conftest.c > conftest.out 2>&1
if test $? -eq 0; then
diff --git a/configure.in b/configure.in
index e24dd824..fbe7dfba 100644
--- a/configure.in
+++ b/configure.in
@@ -1093,17 +1093,24 @@ tools are selected during the Xcode/Developer Tools installation.])
AC_DEFINE(XP_UNIX)
AC_DEFINE(HPUX)
AC_DEFINE(_HPUX_SOURCE)
- AC_DEFINE(hppa)
# OSF1 and HPUX report the POLLHUP event for a socket when the
# shutdown(SHUT_WR) operation is called for the remote end, even though
# the socket is still writeable. Use select(), instead of poll(), to
# workaround this problem.
AC_DEFINE(_PR_POLL_WITH_SELECT)
AC_DEFINE(_USE_BIG_FDS)
- DLL_SUFFIX=sl
DSO_LDOPTS='-b +h $(notdir $@)'
PR_MD_CSRCS=hpux.c
- if test "$OS_TEST" != "ia64"; then
+ if test "$OS_TEST" = "ia64"; then
+ DLL_SUFFIX=so
+ DSO_LDOPTS="$DSO_LDOPTS +b '\$\$ORIGIN'"
+ CPU_ARCH_TAG=_$OS_TEST
+ if test -z "$USE_64"; then
+ COMPILER_TAG=_32
+ fi
+ else
+ AC_DEFINE(hppa)
+ DLL_SUFFIX=sl
PR_MD_ASFILES=os_HPUX.s
fi
if test -n "$USE_64"; then
diff --git a/pr/include/md/_hpux.h b/pr/include/md/_hpux.h
index 73928313..9c294dc5 100644
--- a/pr/include/md/_hpux.h
+++ b/pr/include/md/_hpux.h
@@ -44,8 +44,13 @@
#define PR_LINKER_ARCH "hpux"
#define _PR_SI_SYSNAME "HPUX"
-#define _PR_SI_ARCHITECTURE "hppa1.1"
+#ifdef __ia64
+#define _PR_SI_ARCHITECTURE "ia64"
+#define PR_DLL_SUFFIX ".so"
+#else
+#define _PR_SI_ARCHITECTURE "hppa"
#define PR_DLL_SUFFIX ".sl"
+#endif
#define _PR_VMBASE 0x30000000
#define _PR_STACK_VMBASE 0x50000000