Commit 560c7b91 authored by David Byers's avatar David Byers
Browse files

Check for nsl and socket libraries in the right order so configure works on Solaris 2.5

parent e1a98716
#! /bin/sh
# From configure.in Revision: 1.30
# From configure.in Revision: 1.31
# Guess values for system-dependent variables and create Makefiles.
# Generated automatically using autoconf version 2.4
......@@ -1674,78 +1674,78 @@ EOF
else
echo "$ac_t""no" 1>&6
fi
echo $ac_n "checking for -lsocket""... $ac_c" 1>&6
if eval "test \"`echo '$''{'ac_cv_lib_socket'+set}'`\" = set"; then
echo $ac_n "checking for -lnsl""... $ac_c" 1>&6
if eval "test \"`echo '$''{'ac_cv_lib_nsl'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
LIBS="-lsocket $LIBS"
LIBS="-lnsl $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1685 "configure"
#include "confdefs.h"
int main() { return 0; }
int t() {
socket()
gethostbyname()
; return 0; }
EOF
if eval $ac_link; then
rm -rf conftest*
eval "ac_cv_lib_socket=yes"
eval "ac_cv_lib_nsl=yes"
else
rm -rf conftest*
eval "ac_cv_lib_socket=no"
eval "ac_cv_lib_nsl=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
fi
if eval "test \"`echo '$ac_cv_lib_'socket`\" = yes"; then
if eval "test \"`echo '$ac_cv_lib_'nsl`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_lib=HAVE_LIB`echo socket | tr '[a-z]' '[A-Z]'`
ac_tr_lib=HAVE_LIB`echo nsl | tr '[a-z]' '[A-Z]'`
cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF
LIBS="-lsocket $LIBS"
LIBS="-lnsl $LIBS"
else
echo "$ac_t""no" 1>&6
fi
echo $ac_n "checking for -lnsl""... $ac_c" 1>&6
if eval "test \"`echo '$''{'ac_cv_lib_nsl'+set}'`\" = set"; then
echo $ac_n "checking for -lsocket""... $ac_c" 1>&6
if eval "test \"`echo '$''{'ac_cv_lib_socket'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
LIBS="-lnsl $LIBS"
LIBS="-lsocket $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1723 "configure"
#include "confdefs.h"
int main() { return 0; }
int t() {
gethostbyname()
socket()
; return 0; }
EOF
if eval $ac_link; then
rm -rf conftest*
eval "ac_cv_lib_nsl=yes"
eval "ac_cv_lib_socket=yes"
else
rm -rf conftest*
eval "ac_cv_lib_nsl=no"
eval "ac_cv_lib_socket=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
fi
if eval "test \"`echo '$ac_cv_lib_'nsl`\" = yes"; then
if eval "test \"`echo '$ac_cv_lib_'socket`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_lib=HAVE_LIB`echo nsl | tr '[a-z]' '[A-Z]'`
ac_tr_lib=HAVE_LIB`echo socket | tr '[a-z]' '[A-Z]'`
cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF
LIBS="-lnsl $LIBS"
LIBS="-lsocket $LIBS"
else
echo "$ac_t""no" 1>&6
......
dnl $Id: configure.in,v 1.31 1996/06/09 13:40:05 byers Exp $
dnl $Id: configure.in,v 1.32 1996/06/14 16:12:40 byers Exp $
dnl Configuration for LysKOM
dnl Copyright (C) 1993, 1994, 1995 Lysator Academic Computer Association.
dnl
......@@ -18,7 +18,7 @@ dnl Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
dnl
dnl Please mail bug reports to bug-lyskom@lysator.liu.se.
dnl
AC_REVISION($Revision: 1.31 $)
AC_REVISION($Revision: 1.32 $)
AC_INIT(src/server/lyskomd.h)
AC_ARG_WITH([gnu-malloc],
[ --with-gnu-malloc use GNU malloc],
......@@ -90,8 +90,8 @@ AC_HEADER_TIME
AC_FUNC_ALLOCA
AC_CHECK_LIB(resolv,main) dnl Host name lookup.
AC_CHECK_LIB(authuser,auth_tcpuser3) dnl User authentication according to RFC 931.
AC_CHECK_LIB(socket,socket) dnl socket() et c on Solaris 2.
AC_CHECK_LIB(nsl,gethostbyname) dnl Low-level networking code on Solaris 2.
AC_CHECK_LIB(socket,socket) dnl socket() et c on Solaris 2.
AC_CHECK_LIB(i,setlocale) dnl For setlocale() on Ultrix.
AC_CHECK_FUNCS(difftime getdtablesize sysconf strchr getcwd vfprintf)
AC_CHECK_FUNCS(setrlimit)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment