1 dnl ######################################################################
2 dnl set OS libraries specific to an OS:
3 dnl libnsl/libsocket are needed only on solaris and some svr4 systems.
4 dnl Using a typical macro has proven unsuccesful, because on some other
5 dnl systems such as irix, including libnsl and or libsocket actually breaks
6 dnl lots of code. So I am forced to use a special purpose macro that sets
7 dnl the libraries based on the OS. Sigh. -Erez.
8 AC_DEFUN([AMU_CHECK_OS_LIBS],
10 AC_CACHE_CHECK(for additional OS libraries,
13 # select the correct set of libraries to link with
14 case "${host_os_name}" in
15 svr4* | sysv4* | solaris2* | sunos5* | aoi* )
16 ac_cv_os_libs="-lsocket -lnsl" ;;
21 # set list of libraries to link with
22 if test "$ac_cv_os_libs" != none
24 LIBS="$ac_cv_os_libs $LIBS"
28 dnl ======================================================================