From b09e4485f4591acf36d609b04ca4bfb4993a2314 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Wed, 30 Jul 2003 15:06:56 -0500 Subject: [svn-r7277] Purpose: Bug Fix Description: C++ on Irix 6.5 needs some special libraries (libCio or some such thing). These were defined using the DEFAULT_LIBS macro. However, they weren't being placed into the Makefiles since it wasn't AC_SUBST'ed in configure.in and wasn't declared in commence.in. Solution: Added to configure.in and also added and commence.in Platforms tested: Modi4 (C++, small change and only Irix specific) Misc. update: --- config/commence.in | 5 ++++ configure | 76 +++++------------------------------------------------- configure.in | 6 +++++ 3 files changed, 18 insertions(+), 69 deletions(-) diff --git a/config/commence.in b/config/commence.in index bb8392d..1eddd33 100644 --- a/config/commence.in +++ b/config/commence.in @@ -53,6 +53,11 @@ includedir=@includedir@ docdir=@exec_prefix@/doc PUB_LIB=$(LIB) +## Obtain default library; the current version of libtool does not fully +## support C++ yet, and it does not know which default library to find. +## With libtool 1.5, this support can be removed. - BMR - Jan, 2002 +DEFAULT_LIBS=@DEFAULT_LIBS@ + ## Shared libraries LT_STATIC_EXEC=@LT_STATIC_EXEC@ DYNAMIC_DIRS=@DYNAMIC_DIRS@ diff --git a/configure b/configure index 7cfbccd..d0b9cc0 100755 --- a/configure +++ b/configure @@ -1524,6 +1524,8 @@ host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + DEFAULT_LIBS="" + echo "$as_me:$LINENO: checking shell variables initial values" >&5 @@ -3976,7 +3978,7 @@ test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes case $host in *-*-irix6*) # Find out which ABI we are using. - echo '#line 3979 "configure"' > conftest.$ac_ext + echo '#line 3981 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -4517,7 +4519,7 @@ chmod -w . save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -o out/conftest2.$ac_objext" compiler_c_o=no -if { (eval echo configure:4520: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then +if { (eval echo configure:4522: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test -s out/conftest.err; then @@ -6324,7 +6326,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5 -echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6 -if test "${ac_cv_lib_socket_socket+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsocket $LIBS" -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char socket (); -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif -int -main () -{ -socket (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_socket_socket=yes -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_cv_lib_socket_socket=no -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5 -echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6 -if test $ac_cv_lib_socket_socket = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBSOCKET 1 -_ACEOF - - LIBS="-lsocket $LIBS" - -fi - - echo "$as_me:$LINENO: checking for xdr_int in -lnsl" >&5 echo $ECHO_N "checking for xdr_int in -lnsl... $ECHO_C" >&6 if test "${ac_cv_lib_nsl_xdr_int+set}" = set; then @@ -33873,6 +33810,7 @@ s,@host_cpu@,$host_cpu,;t t s,@host_vendor@,$host_vendor,;t t s,@host_os@,$host_os,;t t s,@CPPFLAGS@,$CPPFLAGS,;t t +s,@DEFAULT_LIBS@,$DEFAULT_LIBS,;t t s,@HSIZET@,$HSIZET,;t t s,@CC@,$CC,;t t s,@CFLAGS@,$CFLAGS,;t t diff --git a/configure.in b/configure.in index 1325479..23f685a 100644 --- a/configure.in +++ b/configure.in @@ -47,6 +47,12 @@ AC_OUTPUT_COMMANDS([ AC_CANONICAL_HOST AC_SUBST([CPPFLAGS]) +dnl Different compilers may need default libraries. They are specified in +dnl the config/* files, so we put this statement here so that it'll be +dnl set by the code which follows... +dnl +AC_SUBST(DEFAULT_LIBS) DEFAULT_LIBS="" + dnl ---------------------------------------------------------------------- dnl Set prefix default (install directory) to a directory in the build area. dnl This allows multiple src-dir builds within one host. -- cgit v0.12