Commit 47a4998a authored by Per Cederqvist's avatar Per Cederqvist
Browse files

Updated for Autoconf 2.

parent 124955cf
dnl $Id: configure.in,v 1.21 1994/11/14 23:43:17 ceder Exp $
dnl $Id: configure.in,v 1.22 1994/12/31 11:37:43 ceder Exp $
dnl Configuration for LysKOM
dnl Copyright (C) 1993, 1994 Lysator Academic Computer Association.
dnl
......@@ -18,10 +18,11 @@ 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.21 $)
AC_REVISION($Revision: 1.22 $)
AC_INIT(src/server/lyskomd.h)
AC_PROG_CC
AC_SUBST(CFLAGS)
AC_SUBST(CPPFLAGS)
AC_SUBST(LDFLAGS)
AC_SUBST(DEPENDFLAG)
AC_SUBST(INCLUDE_CURRENT)
......@@ -29,61 +30,78 @@ INCLUDE_CURRENT=-I.
AC_AIX
AC_ISC_POSIX
AC_MINIX
AC_DYNIX_SEQ
AC_IRIX_SUN
[if test -n "$GCC"; then
] AC_VERBOSE([adding -g -O -ansi -Wall -pipe]) [
CFLAGS="$CFLAGS -g -O -Wall -ansi"
] KOM_AC_CC_OPTION([-pipe]) [
CFLAGS="$CFLAGS -Wall -ansi"
] KOM_COMPILER_CC_ACCEPTS([-pipe]) [
DEPENDFLAG=-MM
else
] KOM_AC_CC_OPTION([-g]) [
case "$CC" in
*vcc) DEPENDFLAG=-Em
INCLUDE_CURRENT='-I`pwd`';;
*) DEPENDFLAG=-M;;
esac
fi]
AC_VERBOSE([Setting DEPENDFLAG to $DEPENDFLAG])
AC_CONST
AC_STDC_HEADERS
AC_COMPILE_CHECK([HPUX and struct sockaddr], dnl
AC_MSG_CHECKING([flag to get dependencies])
AC_MSG_RESULT([$DEPENDFLAG])
AC_C_CONST
AC_HEADER_STDC
AC_MSG_CHECKING([if _HPUX_SOURCE needs to be defined])
AC_CACHE_VAL([kom_cv_sys_hpux_source],
[AC_TRY_LINK(
[#include <sys/types.h>
#include <sys/socket.h>], dnl
[struct sockaddr foo;], dnl
[AC_VERBOSE([No action needed])], dnl IF FOUND
[AC_VERBOSE([Checking for a fix]); dnl IF NOT FOUND
AC_COMPILE_CHECK([_HPUX_SOURCE to fix problems], dnl
#include <sys/socket.h>],
[struct sockaddr foo;],
[kom_cv_sys_hpux_source=no], dnl IF FOUND
[dnl IF NOT FOUND
AC_TRY_LINK(
[#define _HPUX_SOURCE
#include <sys/types.h>
#include <sys/socket.h>], dnl
[struct sockaddr foo;], dnl
AC_DEFINE([_HPUX_SOURCE]), dnl
[AC_WARN([Cannot find struct sockaddr])])])dnl
#include <sys/socket.h>],
[struct sockaddr foo;],
[kom_cv_sys_hpux_source=yes],
[kom_cv_sys_hpux_source=no])])])
AC_MSG_RESULT($kom_cv_sys_hpux_source)
[if test $kom_cv_sys_hpux_source = yes ; then]
AC_DEFINE(_HPUX_SOURCE)
[fi]
AC_SUBST(SRCTOPDIR)
[SRCTOPDIR=`cd $srcdir;pwd`]
AC_SUBST(BUILDTOPDIR)
[BUILDTOPDIR=`pwd`]
AC_CONFIG_AUX_DIR(scripts)
AC_PROG_INSTALL
AC_PROG_RANLIB
AC_PROG_AWK
AC_LN_S
AC_PROG_LN_S
AC_PROG_YACC
AC_PROG_LEX
AC_PROGRAMS_CHECK(SED, sed)
AC_HAVE_HEADERS(string.h memory.h strings.h sys/param.h sys/time.h)
AC_HAVE_HEADERS(stdarg.h stdlib.h stddef.h locale.h sys/resource.h)
AC_TIME_WITH_SYS_TIME
AC_ALLOCA
AC_HAVE_LIBRARY(resolv) dnl Host name lookup.
AC_HAVE_LIBRARY(authuser) dnl User authentication according to RFC 931.
AC_HAVE_LIBRARY(socket) dnl socket() et c on Solaris 2.
AC_HAVE_LIBRARY(nsl) dnl Low-level networking code on Solaris 2.
AC_HAVE_LIBRARY(i) dnl For setlocale() on Ultrix.
AC_HAVE_FUNCS(difftime getdtablesize sysconf strchr getcwd vfprintf)
AC_HAVE_FUNCS(setrlimit)
AC_CHECK_PROGS(SED, sed)
AC_CHECK_HEADERS(string.h memory.h strings.h sys/param.h sys/time.h)
AC_CHECK_HEADERS(stdarg.h stdlib.h stddef.h locale.h sys/resource.h)
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) dnl Low-level networking code 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)
AC_REPLACE_FUNCS(memcpy strerror remove memset memchr)
[DEFS="$DEFS -DBUGGY_INET_NTOA=1 -DENCRYPT_PASSWORDS=1 -DSERVER=1"]
dnl
dnl I don't know how to test for buggy inet_ntoa functions
dnl programmatically, but the supplied substitute should always work,
dnl so we define BUGGY_INET_NTOA unconditionally.
AC_DEFINE(BUGGY_INET_NTOA)
dnl
dnl Unencryptet passwords are no longer supported.
AC_DEFINE(ENCRYPT_PASSWORDS)
dnl
dnl Once upon a time, the server shared some code with the tty-client.
dnl Because of that, you still have to define SERVER while compiling
dnl some of the files in this package. Nowadays sharing is done by copying.
AC_DEFINE(SERVER)
dnl
AC_OUTPUT(Makefile
doc/Makefile
doc/man/Makefile
......
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