summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcls%seawood.org <devnull@localhost>1999-09-02 21:59:31 +0000
committercls%seawood.org <devnull@localhost>1999-09-02 21:59:31 +0000
commit83c95f2a6a4c104bca4c83aa611782fc142f28fd (patch)
tree7a6f147cf1977053fe50c46541b30dc265f29c62
parenta7041cd79ba45ab934e3403b5cc3ac0988caa0dc (diff)
downloadnspr-hg-83c95f2a6a4c104bca4c83aa611782fc142f28fd.tar.gz
Adding autoconf support for Irix. Thanks to Lee Iverson <leei@ai.sri.com> for the patches.
-rwxr-xr-xconfigure74
1 files changed, 52 insertions, 22 deletions
diff --git a/configure b/configure
index bc7d9565..b7551280 100755
--- a/configure
+++ b/configure
@@ -2140,7 +2140,9 @@ PR_MD_ASFILES=
PR_MD_CSRCS=
case "$host" in
-*-linux*)
+*-mingw*)
+ ;;
+*)
HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX"
;;
esac
@@ -2187,6 +2189,30 @@ EOF
esac
;;
+*-irix*)
+ cat >> confdefs.h <<\EOF
+#define XP_UNIX 1
+EOF
+
+ MDCPUCFG_H=_irix32.cfg
+ PR_MD_CSRCS=irix.c
+ AS="as -D_ASM $(INCLUDES) -n32"
+ PR_MD_ASFILES=os_Irix.s
+ PR_MD_ARCH_DIR=unix
+ case "${target_cpu}" in
+ alpha*)
+ cat >> confdefs.h <<\EOF
+#define _POSIX_SOURCE 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define _BSD_SOURCE 1
+EOF
+
+ ;;
+ esac
+ ;;
+
*-mingw*)
cat >> confdefs.h <<\EOF
#define XP_PC 1
@@ -2251,7 +2277,7 @@ esac
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:2255: checking how to run the C preprocessor" >&5
+echo "configure:2281: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -2266,13 +2292,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 2270 "configure"
+#line 2296 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2276: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2302: \"$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
:
@@ -2283,13 +2309,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 2287 "configure"
+#line 2313 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2293: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2319: \"$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
:
@@ -2300,13 +2326,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 2304 "configure"
+#line 2330 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2310: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2336: \"$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
:
@@ -2332,13 +2358,13 @@ echo "$ac_t""$CPP" 1>&6
if test $ac_cv_prog_gcc = yes; then
echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
-echo "configure:2336: checking whether ${CC-cc} needs -traditional" >&5
+echo "configure:2362: 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 2342 "configure"
+#line 2368 "configure"
#include "confdefs.h"
#include <sgtty.h>
Autoconf TIOCGETP
@@ -2356,7 +2382,7 @@ rm -f conftest*
if test $ac_cv_prog_gcc_traditional = no; then
cat > conftest.$ac_ext <<EOF
-#line 2360 "configure"
+#line 2386 "configure"
#include "confdefs.h"
#include <termio.h>
Autoconf TCGETA
@@ -2380,12 +2406,12 @@ fi
for ac_func in lchown strerror
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2384: checking for $ac_func" >&5
+echo "configure:2410: 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 2389 "configure"
+#line 2415 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2408,7 +2434,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2438: \"$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
@@ -2456,7 +2482,7 @@ fi
echo $ac_n "checking for pthread_attr_init in -lpthread""... $ac_c" 1>&6
-echo "configure:2460: checking for pthread_attr_init in -lpthread" >&5
+echo "configure:2486: checking for pthread_attr_init in -lpthread" >&5
ac_lib_var=`echo pthread'_'pthread_attr_init | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2464,7 +2490,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpthread $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2468 "configure"
+#line 2494 "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
@@ -2475,7 +2501,7 @@ int main() {
pthread_attr_init()
; return 0; }
EOF
-if { (eval echo configure:2479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2505: \"$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
@@ -2500,7 +2526,7 @@ if test "x$ac_cv_lib_pthread_pthread_attr_init" = "xno" -a \
"x$ac_cv_lib_c_r_gethostbyname_r" = "xno"
then
echo $ac_n "checking for pthread_attr_init in -lc_r""... $ac_c" 1>&6
-echo "configure:2504: checking for pthread_attr_init in -lc_r" >&5
+echo "configure:2530: checking for pthread_attr_init in -lc_r" >&5
ac_lib_var=`echo c_r'_'pthread_attr_init | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2508,7 +2534,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lc_r $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2512 "configure"
+#line 2538 "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
@@ -2519,7 +2545,7 @@ int main() {
pthread_attr_init()
; return 0; }
EOF
-if { (eval echo configure:2523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2549: \"$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
@@ -2643,7 +2669,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:2647: checking whether ${CC-cc} accepts -pthread" >&5
+echo "configure:2673: 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
@@ -2696,10 +2722,14 @@ else
USE_NSPR_THREADS=
else
USE_NSPR_THREADS=1
- cat >> confdefs.h <<\EOF
+ case "$target" in
+ *-linux*)
+ cat >> confdefs.h <<\EOF
#define _PR_LOCAL_THREADS_ONLY 1
EOF
+ ;;
+ esac
fi
fi