Commit 3aff202e authored by Per Cederqvist's avatar Per Cederqvist
Browse files

Don't use "-ansi" in compilations -- it appears to be impossible to

get both struct sigaction and struct linger on SunOS 5.4 with it.
(HAVE_STRUCT_SIGACTION): Define it if struct sigaction can be found.
(_POSIX_SOURCE): Define it if needed to get struct sigaction.
parent f3474fd0
dnl $Id: configure.in,v 1.33 1996/07/28 23:28:00 ceder Exp $
dnl $Id: configure.in,v 1.34 1996/07/30 14:30:34 ceder 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.33 $)
AC_REVISION($Revision: 1.34 $)
AC_INIT(src/server/lyskomd.h)
AC_ARG_WITH([gnu-malloc],
[ --with-gnu-malloc use GNU malloc],
......@@ -36,7 +36,7 @@ AC_AIX
AC_ISC_POSIX
AC_MINIX
[if test -n "$GCC"; then
CFLAGS="$CFLAGS -Wall -ansi"
CFLAGS="$CFLAGS -Wall"
] AC_DEFINE(_GNU_SOURCE)
KOM_COMPILER_CC_ACCEPTS([-pipe]) [
DEPENDFLAG=-MM
......@@ -49,6 +49,37 @@ else
fi]
AC_MSG_CHECKING([flag to get dependencies])
AC_MSG_RESULT([$DEPENDFLAG])
# Do this test early since it may define _POSIX_SOURCE, which may
# affect future tests.
AC_MSG_CHECKING([if <signal.h> defines struct sigaction])
AC_CACHE_VAL([kom_cv_header_posix_source_needed],
[# This default may be overridden below.
kom_cv_header_posix_source_needed=no])
AC_CACHE_VAL([kom_cv_struct_sigaction],
AC_TRY_COMPILE([#include <signal.h>],
[struct sigaction foosig;],
[kom_cv_struct_sigaction=yes],
[kom_cv_struct_sigaction=no])
[if test $kom_cv_struct_sigaction = no ; then]
AC_TRY_COMPILE(
[#define _POSIX_SOURCE
#include <signal.h>],
[struct sigaction barsig;],
[kom_cv_struct_sigaction=yes
kom_cv_header_posix_source_needed=yes],
[kom_cv_struct_sigaction=no])
[fi])
[if test $kom_cv_header_posix_source_needed = yes ; then]
AC_MSG_RESULT([yes, but _POSIX_SOURCE was needed])
AC_DEFINE(_POSIX_SOURCE)
[else]
AC_MSG_RESULT($kom_cv_struct_sigaction)
[fi]
[if test $kom_cv_struct_sigaction = yes ; then]
AC_DEFINE(HAVE_STRUCT_SIGACTION)
[fi]
AC_C_CONST
AC_HEADER_STDC
AC_TYPE_PID_T
......
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