diff options
author | wtc%netscape.com <devnull@localhost> | 2003-03-26 01:36:20 +0000 |
---|---|---|
committer | wtc%netscape.com <devnull@localhost> | 2003-03-26 01:36:20 +0000 |
commit | 121b06591deb962cffe147b91e427d212ab8dbca (patch) | |
tree | 49d65cb760bfbdf4d2e9c6f0854cfad826d1823a /configure | |
parent | 372d4f43f488cc078c9d30d7b503b2fac94e1740 (diff) | |
download | nspr-hg-121b06591deb962cffe147b91e427d212ab8dbca.tar.gz |
Bug 188246: support building NSPR with gcc 3.x on OS/2. also fixed the
tests. The patch is contributed by Javier Pedemonte <pedemont@us.ibm.com>.
Modified Files: configure configure.in rules.mk lib/ds/Makefile.in
lib/libc/src/Makefile.in _os2.h pr/src/Makefile.in prlink.c
pr/src/md/os2/Makefile.in pr/src/md/os2/objs.mk os2cv.c os2misc.c
os2poll.c os2sock.c os2thred.c pr/tests/Makefile.in attach.c runtests.sh
Tag: NSPRPUB_PRE_4_2_CLIENT_BRANCH
Added Files: os2emx.s
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 87 |
1 files changed, 44 insertions, 43 deletions
@@ -1063,7 +1063,7 @@ EOF beos*) DEFINES="$DEFINES -DDEBUG_${USER}" ;; - msvc*|mksnt*|cygwin*|mingw*) + msvc*|mksnt*|cygwin*|mingw*|os2*) DEFINES="$DEFINES -DDEBUG_`echo ${USERNAME} | sed -e 's| |_|g'`" ;; *) @@ -2529,7 +2529,7 @@ fi if test "$GXX" = "yes"; then GNU_CXX=1 fi -if test "`echo | $AS -V 2>&1 | grep -c GNU`" != "0"; then +if test "`echo | $AS -v 2>&1 | grep -c GNU`" != "0"; then GNU_AS=1 fi rm -f a.out @@ -4607,10 +4607,8 @@ EOF #define _PR_GLOBAL_THREADS_ONLY 1 EOF - OBJ_SUFFIX=obj LIB_SUFFIX=lib DLL_SUFFIX=dll - ASM_SUFFIX=asm RC=rc.exe PR_MD_ARCH_DIR=os2 PROG_SUFFIX=.exe @@ -4619,7 +4617,7 @@ EOF RESOLVE_LINK_SYMBOLS=1 # EMX/GCC build - if test "$GNU_CC"; then + if test -n "$GNU_CC"; then cat >> confdefs.h <<\EOF #define XP_OS2_EMX 1 EOF @@ -4630,29 +4628,30 @@ EOF AR=emxomfar AR_FLAGS='-p256 r $@' - CFLAGS="-Zmtd -Zomf" - HOST_CFLAGS="$CFLAGS" - CXXFLAGS="-Zmtd -Zomf" + CFLAGS="$CFLAGS -Wall -Zmtd -Zomf" + CXXFLAGS="$CFLAGS -Wall -Zmtd -Zomf" + MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@' + DSO_CFLAGS= + DSO_LDOPTS='-Zomf -Zdll -Zmtd' + _OPTIMIZE_FLAGS=-O3 + _DEBUG_FLAGS="-g -fno-inline" + if test -n "$MOZ_OPTIMIZE"; then + DSO_LDOPTS="$DSO_LDOPTS -Zlinker /EXEPACK:2 -Zlinker /PACKCODE -Zlinker /PACKDATA" + fi OS_LIBS="-lsocket -lemxio" - LD='$(CC)' IMPLIB='emximp -o' - FILTER='emxexp' - OS_DLLFLAGS='$(DSO_LDOPTS) -o $@' - _OPTIMIZE_FLAGS=-O3 - _DEBUG_FLAGS=-g - if test -n "$MOZ_DEBUG"; then - DLLFLAGS='-g' - EXEFLAGS='-g $(OMF_FLAG) -Zmtd -L$(DIST)/lib -o $@' - DSO_LDOPTS='-g -Zomf -Zdll -Zmt -Zcrtdll -Zlinker /NOO' - else - DLLFLAGS= - EXEFLAGS='-Zmtd -o $@' - DSO_LDOPTS='-Zomf -Zdll -Zmt -Zcrtdll -Zlinker /NOO' + FILTER='emxexp -o' + + if test -z "$EMXOMFLD_LINKER"; then + # using LINK386.EXE + DSO_LDOPTS="$DSO_LDOPTS -Zlinker /NOO" fi - fi - + + # GCC for OS/2 currently predefines these, but we don't want them + DEFINES="$DEFINES -Uunix -U__unix -U__unix__" + # Visual Age C++ build - if test "$VACPP" = "yes"; then + elif test "$VACPP" = "yes"; then cat >> confdefs.h <<\EOF #define XP_OS2_VACPP 1 EOF @@ -4669,8 +4668,10 @@ EOF #define _X86_ 1 EOF + OBJ_SUFFIX=obj AS=alp ASFLAGS='-Mb' + ASM_SUFFIX=asm AR=-ilib AR_FLAGS='/NOL /NOI /O:$(subst /,\\,$@)' CFLAGS='/Q /qlibansi /Gd+ /Gm+ /Su4 /Mp /Tl9' @@ -4715,12 +4716,12 @@ esac if test -z "$SKIP_LIBRARY_CHECKS"; then echo $ac_n "checking for dlopen""... $ac_c" 1>&6 -echo "configure:4719: checking for dlopen" >&5 +echo "configure:4720: 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 4724 "configure" +#line 4725 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char dlopen(); below. */ @@ -4743,7 +4744,7 @@ dlopen(); ; 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:4748: \"$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 @@ -4762,7 +4763,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:4766: checking for dlopen in -ldl" >&5 +echo "configure:4767: 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 @@ -4770,7 +4771,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <<EOF -#line 4774 "configure" +#line 4775 "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 @@ -4781,7 +4782,7 @@ int main() { dlopen() ; return 0; } EOF -if { (eval echo configure:4785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4786: \"$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 @@ -4809,13 +4810,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:4813: checking whether ${CC-cc} needs -traditional" >&5 +echo "configure:4814: 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 4819 "configure" +#line 4820 "configure" #include "confdefs.h" #include <sgtty.h> Autoconf TIOCGETP @@ -4833,7 +4834,7 @@ rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat > conftest.$ac_ext <<EOF -#line 4837 "configure" +#line 4838 "configure" #include "confdefs.h" #include <termio.h> Autoconf TCGETA @@ -4857,12 +4858,12 @@ fi for ac_func in lchown strerror do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4861: checking for $ac_func" >&5 +echo "configure:4862: 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 4866 "configure" +#line 4867 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -4885,7 +4886,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:4889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4890: \"$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 @@ -4924,7 +4925,7 @@ hpux*) if test -z "$GNU_CC"; then echo $ac_n "checking for +Olit support""... $ac_c" 1>&6 -echo "configure:4928: checking for +Olit support" >&5 +echo "configure:4929: 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 @@ -4958,7 +4959,7 @@ esac echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6 -echo "configure:4962: checking for pthread_create in -lpthreads" >&5 +echo "configure:4963: checking for pthread_create in -lpthreads" >&5 echo " #include <pthread.h> void *foo(void *v) { return v; } @@ -4980,7 +4981,7 @@ echo " echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 -echo "configure:4984: checking for pthread_create in -lpthread" >&5 +echo "configure:4985: checking for pthread_create in -lpthread" >&5 echo " #include <pthread.h> void *foo(void *v) { return v; } @@ -5002,7 +5003,7 @@ echo " echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 -echo "configure:5006: checking for pthread_create in -lc_r" >&5 +echo "configure:5007: checking for pthread_create in -lc_r" >&5 echo " #include <pthread.h> void *foo(void *v) { return v; } @@ -5024,7 +5025,7 @@ echo " echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6 -echo "configure:5028: checking for pthread_create in -lc" >&5 +echo "configure:5029: checking for pthread_create in -lc" >&5 echo " #include <pthread.h> void *foo(void *v) { return v; } @@ -5176,7 +5177,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:5180: checking whether ${CC-cc} accepts -pthread" >&5 +echo "configure:5181: 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 @@ -5199,7 +5200,7 @@ echo "configure:5180: 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:5203: checking whether ${CC-cc} accepts -pthreads" >&5 +echo "configure:5204: 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 |