From e018c37d9dbcca0f82e6ea55a22d03f556849afb Mon Sep 17 00:00:00 2001 From: "martinl%netscape.com" Date: Tue, 20 Aug 2002 22:20:52 +0000 Subject: Bugzilla 146426 Fix compiler warning for +ESlit (OEM branch checkin) a=jdunn r=wtc --- configure | 81 ++++++++++++++++++++++++++++++++++++++++++------------------ configure.in | 34 +++++++++++++++++++++++-- 2 files changed, 89 insertions(+), 26 deletions(-) diff --git a/configure b/configure index bbd9de53..bf3d0a46 100755 --- a/configure +++ b/configure @@ -3335,8 +3335,6 @@ EOF if test -z "$GNU_CC"; then CC="$CC -Ae" CXX="$CXX -ext" - CFLAGS="$CFLAGS +ESlit" - CXXFLAGS="$CXXFLAGS +ESlit" DSO_CFLAGS=+Z else DSO_CFLAGS=-fPIC @@ -4159,17 +4157,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:4163: checking for machine/builtins.h" >&5 +echo "configure:4161: 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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4173: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4171: \"$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* @@ -4684,12 +4682,12 @@ esac if test -z "$SKIP_LIBRARY_CHECKS"; then echo $ac_n "checking for dlopen""... $ac_c" 1>&6 -echo "configure:4688: checking for dlopen" >&5 +echo "configure:4686: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4714: \"$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 @@ -4731,7 +4729,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:4735: checking for dlopen in -ldl" >&5 +echo "configure:4733: 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 @@ -4739,7 +4737,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4752: \"$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 @@ -4778,13 +4776,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:4782: checking whether ${CC-cc} needs -traditional" >&5 +echo "configure:4780: 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 < Autoconf TIOCGETP @@ -4802,7 +4800,7 @@ rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat > conftest.$ac_ext < Autoconf TCGETA @@ -4826,12 +4824,12 @@ fi for ac_func in lchown strerror do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4830: checking for $ac_func" >&5 +echo "configure:4828: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4856: \"$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 @@ -4888,11 +4886,46 @@ if test "${enable_strip+set}" = set; then fi +case "${target_os}" in +hpux*) +if test -z "$GNU_CC"; then + + echo $ac_n "checking for +Olit support""... $ac_c" 1>&6 +echo "configure:4895: 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 + ac_cv_hpux_usable_olit_option=no + rm -f conftest* + echo 'int main() { return 0; }' | cat > conftest.c + ${CC-cc} ${CFLAGS} +Olit=all -o conftest conftest.c > conftest.out 2>&1 + if test $? -eq 0; then + if test -z "`egrep -i '(unrecognize|unknown)' conftest.out`"; then + ac_cv_hpux_usable_olit_option=yes + fi + fi + rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_hpux_usable_olit_option" 1>&6 + + if test "$ac_cv_hpux_usable_olit_option" = "yes"; then + CFLAGS="$CFLAGS +Olit=all" + CXXFLAGS="$CXXFLAGS +Olit=all" + else + CFLAGS="$CFLAGS +ESlit" + CXXFLAGS="$CXXFLAGS +ESlit" + fi +fi +;; +esac + echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6 -echo "configure:4896: checking for pthread_create in -lpthreads" >&5 +echo "configure:4929: checking for pthread_create in -lpthreads" >&5 echo " #include void *foo(void *v) { int a = 1; } @@ -4914,7 +4947,7 @@ echo " echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 -echo "configure:4918: checking for pthread_create in -lpthread" >&5 +echo "configure:4951: checking for pthread_create in -lpthread" >&5 echo " #include void *foo(void *v) { int a = 1; } @@ -4936,7 +4969,7 @@ echo " echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 -echo "configure:4940: checking for pthread_create in -lc_r" >&5 +echo "configure:4973: checking for pthread_create in -lc_r" >&5 echo " #include void *foo(void *v) { int a = 1; } @@ -4958,7 +4991,7 @@ echo " echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6 -echo "configure:4962: checking for pthread_create in -lc" >&5 +echo "configure:4995: checking for pthread_create in -lc" >&5 echo " #include void *foo(void *v) { int a = 1; } @@ -5108,7 +5141,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:5112: checking whether ${CC-cc} accepts -pthread" >&5 +echo "configure:5145: 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 @@ -5131,7 +5164,7 @@ echo "configure:5112: 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:5135: checking whether ${CC-cc} accepts -pthreads" >&5 +echo "configure:5168: 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 @@ -5618,7 +5651,7 @@ s%\[%\\&%g s%\]%\\&%g s%\$%$$%g EOF -DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' ' | tr '\015' ' '` +DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '` rm -f conftest.defs diff --git a/configure.in b/configure.in index 47772bbd..44d6b9fd 100644 --- a/configure.in +++ b/configure.in @@ -911,8 +911,6 @@ case "$target" in if test -z "$GNU_CC"; then CC="$CC -Ae" CXX="$CXX -ext" - CFLAGS="$CFLAGS +ESlit" - CXXFLAGS="$CXXFLAGS +ESlit" DSO_CFLAGS=+Z else DSO_CFLAGS=-fPIC @@ -1873,6 +1871,38 @@ AC_ARG_ENABLE(strip, [ --enable-strip Enable stripping of shared libs and programs], [ ENABLE_STRIP=1 ]) +dnl Check for hpux options +case "${target_os}" in +hpux*) +if test -z "$GNU_CC"; then + + AC_CACHE_CHECK(for +Olit support, + ac_cv_hpux_usable_olit_option, + dnl since aCC doesn't throw an error on invalid options, + dnl we have to test this the hard way + [ac_cv_hpux_usable_olit_option=no + rm -f conftest* + echo 'int main() { return 0; }' | cat > conftest.c + ${CC-cc} ${CFLAGS} +Olit=all -o conftest conftest.c > conftest.out 2>&1 + if test $? -eq 0; then + if test -z "`egrep -i '(unrecognize|unknown)' conftest.out`"; then + ac_cv_hpux_usable_olit_option=yes + fi + fi + rm -f conftest* + ]) + + if test "$ac_cv_hpux_usable_olit_option" = "yes"; then + CFLAGS="$CFLAGS +Olit=all" + CXXFLAGS="$CXXFLAGS +Olit=all" + else + CFLAGS="$CFLAGS +ESlit" + CXXFLAGS="$CXXFLAGS +ESlit" + fi +fi +;; +esac + dnl dnl Apparently, some systems cannot properly check for the pthread dnl library unless is included so we need to test -- cgit v1.2.1