summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwtc%netscape.com <devnull@localhost>2001-10-17 20:50:51 +0000
committerwtc%netscape.com <devnull@localhost>2001-10-17 20:50:51 +0000
commit01365b5faaa5ea3111d42b830c759454f55e36ca (patch)
tree983ac27a4abfedd5a3bc39f1267fc949f2b5a6b8
parentfd9b17f9d5efa8fed8256a68d6e15532651101b8 (diff)
downloadnspr-hg-01365b5faaa5ea3111d42b830c759454f55e36ca.tar.gz
Bugzilla bug 77188: checked in a configure patch for Neutrino from
dinglis@qnx.com (Dave Inglis). r=wtc. Modified files: configure configure.in
-rwxr-xr-xconfigure66
-rw-r--r--configure.in18
2 files changed, 47 insertions, 37 deletions
diff --git a/configure b/configure
index 86460f5e..3c2ef17d 100755
--- a/configure
+++ b/configure
@@ -3923,16 +3923,12 @@ EOF
MDCPUCFG_H=_nto.cfg
PR_MD_CSRCS=nto.c
- MKSHLIB='qcc -Vgcc_ntox86 -shared -Wl,-h$(@:$(OBJDIR)/%.so=%.so) -M -o $(@:$(OBJDIR)/%.so=%.so)'
- CFLAGS="$CFLAGS -Wc,-Wall -Wc,-Wno-parentheses -shared"
+ MKSHLIB='$(CC) $(DSO_LDOPTS) -Wl,-soname -Wl,$(notdir $@) -o $@'
+ DSO_CFLAGS=-fPIC
+ DSO_LDOPTS=-shared
OS_LIBS="$OS_LIBS -lsocket"
_OPTIMIZE_FLAGS="-O1"
- _DEBUG_FLAGS="-O1 -gstabs"
- CC="qcc -Vgcc_ntox86 -w"
- CXX='$(CC)'
- LD="qcc -Vgcc_ntox86 -nostdlib"
- AR="qcc -Vgcc_ntox86 -M -a $@"
- AR_FLAGS=
+ _DEBUG_FLAGS="-gstabs"
;;
*-openbsd*)
@@ -4016,17 +4012,17 @@ EOF
ac_safe=`echo "machine/builtins.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for machine/builtins.h""... $ac_c" 1>&6
-echo "configure:4020: checking for machine/builtins.h" >&5
+echo "configure:4016: 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 4025 "configure"
+#line 4021 "configure"
#include "confdefs.h"
#include <machine/builtins.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4030: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4026: \"$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*
@@ -4573,12 +4569,12 @@ esac
if test -z "$SKIP_LIBRARY_CHECKS"; then
echo $ac_n "checking for dlopen""... $ac_c" 1>&6
-echo "configure:4577: checking for dlopen" >&5
+echo "configure:4573: checking for dlopen" >&5
if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4582 "configure"
+#line 4578 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char dlopen(); below. */
@@ -4601,7 +4597,7 @@ dlopen();
; return 0; }
EOF
-if { (eval echo configure:4605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_dlopen=yes"
else
@@ -4620,7 +4616,7 @@ else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:4624: checking for dlopen in -ldl" >&5
+echo "configure:4620: 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
@@ -4628,7 +4624,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4632 "configure"
+#line 4628 "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
@@ -4639,7 +4635,7 @@ int main() {
dlopen()
; return 0; }
EOF
-if { (eval echo configure:4643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4639: \"$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
@@ -4667,13 +4663,13 @@ fi
if test $ac_cv_prog_gcc = yes; then
echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
-echo "configure:4671: checking whether ${CC-cc} needs -traditional" >&5
+echo "configure:4667: 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 4677 "configure"
+#line 4673 "configure"
#include "confdefs.h"
#include <sgtty.h>
Autoconf TIOCGETP
@@ -4691,7 +4687,7 @@ rm -f conftest*
if test $ac_cv_prog_gcc_traditional = no; then
cat > conftest.$ac_ext <<EOF
-#line 4695 "configure"
+#line 4691 "configure"
#include "confdefs.h"
#include <termio.h>
Autoconf TCGETA
@@ -4715,12 +4711,12 @@ fi
for ac_func in lchown strerror
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4719: checking for $ac_func" >&5
+echo "configure:4715: 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 4724 "configure"
+#line 4720 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -4743,7 +4739,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:4747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4743: \"$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
@@ -4781,7 +4777,7 @@ fi
echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
-echo "configure:4785: checking for pthread_create in -lpthreads" >&5
+echo "configure:4781: checking for pthread_create in -lpthreads" >&5
echo "
#include <pthread.h>
void *foo(void *v) { int a = 1; }
@@ -4803,7 +4799,7 @@ echo "
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
-echo "configure:4807: checking for pthread_create in -lpthread" >&5
+echo "configure:4803: checking for pthread_create in -lpthread" >&5
echo "
#include <pthread.h>
void *foo(void *v) { int a = 1; }
@@ -4825,7 +4821,7 @@ echo "
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
-echo "configure:4829: checking for pthread_create in -lc_r" >&5
+echo "configure:4825: checking for pthread_create in -lc_r" >&5
echo "
#include <pthread.h>
void *foo(void *v) { int a = 1; }
@@ -4847,7 +4843,7 @@ echo "
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6
-echo "configure:4851: checking for pthread_create in -lc" >&5
+echo "configure:4847: checking for pthread_create in -lc" >&5
echo "
#include <pthread.h>
void *foo(void *v) { int a = 1; }
@@ -4997,7 +4993,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:5001: checking whether ${CC-cc} accepts -pthread" >&5
+echo "configure:4997: 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
@@ -5013,7 +5009,7 @@ echo "configure:5001: 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:5017: checking whether ${CC-cc} accepts -pthreads" >&5
+echo "configure:5013: 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
@@ -5239,6 +5235,18 @@ EOF
fi
fi
;;
+*-nto*)
+ if test -n "$USE_PTHREADS"; then
+ cat >> confdefs.h <<\EOF
+#define _PR_HAVE_GETHOST_R 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define _PR_HAVE_GETHOST_R_POINTER 1
+EOF
+
+ fi
+ ;;
esac
OS_LIBS="$_PTHREAD_LDFLAGS $OS_LIBS"
diff --git a/configure.in b/configure.in
index 3aaf6e6a..4484a899 100644
--- a/configure.in
+++ b/configure.in
@@ -1326,16 +1326,12 @@ mips-sony-newsos*)
AC_DEFINE(HAVE_POINTER_LOCALTIME_R)
MDCPUCFG_H=_nto.cfg
PR_MD_CSRCS=nto.c
- MKSHLIB='qcc -Vgcc_ntox86 -shared -Wl,-h$(@:$(OBJDIR)/%.so=%.so) -M -o $(@:$(OBJDIR)/%.so=%.so)'
- CFLAGS="$CFLAGS -Wc,-Wall -Wc,-Wno-parentheses -shared"
+ MKSHLIB='$(CC) $(DSO_LDOPTS) -Wl,-soname -Wl,$(notdir $@) -o $@'
+ DSO_CFLAGS=-fPIC
+ DSO_LDOPTS=-shared
OS_LIBS="$OS_LIBS -lsocket"
_OPTIMIZE_FLAGS="-O1"
- _DEBUG_FLAGS="-O1 -gstabs"
- CC="qcc -Vgcc_ntox86 -w"
- CXX='$(CC)'
- LD="qcc -Vgcc_ntox86 -nostdlib"
- AR="qcc -Vgcc_ntox86 -M -a $@"
- AR_FLAGS=
+ _DEBUG_FLAGS="-gstabs"
;;
*-openbsd*)
@@ -2115,6 +2111,12 @@ case "$target" in
fi
fi
;;
+*-nto*)
+ if test -n "$USE_PTHREADS"; then
+ AC_DEFINE(_PR_HAVE_GETHOST_R)
+ AC_DEFINE(_PR_HAVE_GETHOST_R_POINTER)
+ fi
+ ;;
esac
OS_LIBS="$_PTHREAD_LDFLAGS $OS_LIBS"