From bea85e0705d200de16d8e1affad5d2abb6954b6e Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Fri, 4 Sep 2015 03:20:26 -0500 Subject: [svn-r27675] Removed library checks for nsl and socket from the autotools configure on Solaris. The nsl and socket libraries are no longer used by the library. Fixes HDFFV-9118. Tested on: h5committest (CMake fortran fails due to an unrelated error) jam w/ CMake --- config/cmake/H5pubconf.h.in | 6 -- config/cmake_ext_mod/ConfigureChecks.cmake | 7 +- configure | 110 ----------------------------- configure.ac | 6 -- src/H5config.h.in | 6 -- 5 files changed, 1 insertion(+), 134 deletions(-) diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in index 37bcfbf..0faf92e 100644 --- a/config/cmake/H5pubconf.h.in +++ b/config/cmake/H5pubconf.h.in @@ -185,15 +185,9 @@ /* Define to 1 if you have the `mpe' library (-lmpe). */ #cmakedefine H5_HAVE_LIBMPE @H5_HAVE_LIBMPE@ -/* Define to 1 if you have the `nsl' library (-lnsl). */ -#cmakedefine H5_HAVE_LIBNSL @H5_HAVE_LIBNSL@ - /* Define to 1 if you have the `pthread' library (-lpthread). */ #cmakedefine H5_HAVE_LIBPTHREAD @H5_HAVE_LIBPTHREAD@ -/* Define to 1 if you have the `socket' library (-lsocket). */ -#cmakedefine H5_HAVE_LIBSOCKET @H5_HAVE_LIBSOCKET@ - /* Define to 1 if you have the `sz' library (-lsz). */ #cmakedefine H5_HAVE_LIBSZ @H5_HAVE_LIBSZ@ diff --git a/config/cmake_ext_mod/ConfigureChecks.cmake b/config/cmake_ext_mod/ConfigureChecks.cmake index e058b10..6885187 100644 --- a/config/cmake_ext_mod/ConfigureChecks.cmake +++ b/config/cmake_ext_mod/ConfigureChecks.cmake @@ -117,13 +117,8 @@ if (NOT WINDOWS) CHECK_LIBRARY_EXISTS_CONCAT ("wsock32" gethostbyname ${HDF_PREFIX}_HAVE_LIBWSOCK32) endif (NOT WINDOWS) +# UCB (BSD) compatibility library CHECK_LIBRARY_EXISTS_CONCAT ("ucb" gethostname ${HDF_PREFIX}_HAVE_LIBUCB) -CHECK_LIBRARY_EXISTS_CONCAT ("socket" connect ${HDF_PREFIX}_HAVE_LIBSOCKET) -CHECK_LIBRARY_EXISTS ("c" gethostbyname "" NOT_NEED_LIBNSL) - -if (NOT NOT_NEED_LIBNSL) - CHECK_LIBRARY_EXISTS_CONCAT ("nsl" gethostbyname ${HDF_PREFIX}_HAVE_LIBNSL) -endif (NOT NOT_NEED_LIBNSL) # For other tests to use the same libraries set (CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${LINK_LIBS}) diff --git a/configure b/configure index 6c8b0ff..5139e01 100755 --- a/configure +++ b/configure @@ -23034,116 +23034,6 @@ _ACEOF fi -if test "`uname`" = "SunOS" -o "`uname -sr`" = "HP-UX B.11.00"; then - ## ...for Solaris - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5 -$as_echo_n "checking for socket in -lsocket... " >&6; } -if ${ac_cv_lib_socket_socket+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsocket $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char socket (); -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -return socket (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_socket_socket=yes -else - ac_cv_lib_socket_socket=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5 -$as_echo "$ac_cv_lib_socket_socket" >&6; } -if test "x$ac_cv_lib_socket_socket" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBSOCKET 1 -_ACEOF - - LIBS="-lsocket $LIBS" - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xdr_int in -lnsl" >&5 -$as_echo_n "checking for xdr_int in -lnsl... " >&6; } -if ${ac_cv_lib_nsl_xdr_int+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lnsl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char xdr_int (); -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -return xdr_int (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_nsl_xdr_int=yes -else - ac_cv_lib_nsl_xdr_int=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_xdr_int" >&5 -$as_echo "$ac_cv_lib_nsl_xdr_int" >&6; } -if test "x$ac_cv_lib_nsl_xdr_int" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBNSL 1 -_ACEOF - - LIBS="-lnsl $LIBS" - -fi - -fi - ## ---------------------------------------------------------------------- ## Check for system header files. ## diff --git a/configure.ac b/configure.ac index 3d4c4a4..811cb44 100644 --- a/configure.ac +++ b/configure.ac @@ -961,12 +961,6 @@ esac AC_CHECK_LIB([m], [ceil]) AC_CHECK_LIB([dl], [dlopen]) -if test "`uname`" = "SunOS" -o "`uname -sr`" = "HP-UX B.11.00"; then - ## ...for Solaris - AC_CHECK_LIB([socket], [socket]) - AC_CHECK_LIB([nsl], [xdr_int]) -fi - ## ---------------------------------------------------------------------- ## Check for system header files. ## diff --git a/src/H5config.h.in b/src/H5config.h.in index 252ec04..9ac2327 100644 --- a/src/H5config.h.in +++ b/src/H5config.h.in @@ -203,15 +203,9 @@ /* Define to 1 if you have the `mpe' library (-lmpe). */ #undef HAVE_LIBMPE -/* Define to 1 if you have the `nsl' library (-lnsl). */ -#undef HAVE_LIBNSL - /* Define to 1 if you have the `pthread' library (-lpthread). */ #undef HAVE_LIBPTHREAD -/* Define to 1 if you have the `socket' library (-lsocket). */ -#undef HAVE_LIBSOCKET - /* Define to 1 if you have the `sz' library (-lsz). */ #undef HAVE_LIBSZ -- cgit v0.12