Commit f26c2870 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

Upgraded for autoconf-2.56 and automake-1.7.1: Use AC_COMPILE_IFELSE

instead of AC_TRY_COMPILE.  Use AC_LANG_PROGRAM.  Use AC_LINK_IFELSE
instead of AC_TRY_LINK.  Use AC_RUN_IFELSE instead of AC_TRY_RUN.
parent 0908347d
dnl $Id: configure.in,v 1.93 2002/10/31 09:30:07 ceder Exp $
dnl $Id: configure.in,v 1.94 2002/11/25 22:25:55 ceder Exp $
dnl Configuration for LysKOM
dnl Copyright (C) 1993-2002 Lysator Academic Computer Association.
dnl
......@@ -18,8 +18,8 @@ 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.93 $)
AC_PREREQ(2.53)
AC_REVISION($Revision: 1.94 $)
AC_PREREQ(2.56)
AC_INIT([lyskom-server], [2.0.7])
AC_CONFIG_SRCDIR([src/server/lyskomd.h])
AM_CONFIG_HEADER(config.h)
......@@ -197,15 +197,15 @@ 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;],
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#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;],
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([[#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])
......@@ -230,8 +230,8 @@ dnl
dnl Check for sig_atomic_t
dnl
AC_CACHE_CHECK([if sig_atomic_t exists], kom_cv_type_sig_atomic_t,
[AC_TRY_COMPILE([#include <signal.h>],
[sig_atomic_t t;],
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <signal.h>]],
[[sig_atomic_t t;]])],
[kom_cv_type_sig_atomic_t=yes],
[kom_cv_type_sig_atomic_t=no])])
[if test $kom_cv_type_sig_atomic_t = no
......@@ -244,17 +244,14 @@ dnl
# FIXME (bug 209): is this needed now that we use AM_C_PROTOTYPES?
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>],
[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>],
[struct sockaddr foo;],
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
#include <sys/socket.h>]],
[[struct sockaddr foo;]])],
[kom_cv_sys_hpux_source=no],
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#define _HPUX_SOURCE
#include <sys/types.h>
#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)
......@@ -266,8 +263,8 @@ dnl
dnl
AC_MSG_CHECKING([if the compiler understands __attribute__ ((format))])
AC_CACHE_VAL([kom_cv_c_attribute_format_printf],
[AC_TRY_COMPILE([extern void log (const char *f, ...)
__attribute__ ((format (printf, 1, 2)));],,
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[extern void log (const char *f, ...)
__attribute__ ((format (printf, 1, 2)));]], [[]])],
[kom_cv_c_attribute_format_printf=yes],
[kom_cv_c_attribute_format_printf=no])])
AC_MSG_RESULT($kom_cv_c_attribute_format_printf)
......@@ -277,8 +274,8 @@ AC_MSG_RESULT($kom_cv_c_attribute_format_printf)
[fi]
AC_MSG_CHECKING([if the compiler understands __attribute__ ((__noreturn__))])
AC_CACHE_VAL([kom_cv_c_attribute_noreturn],
[AC_TRY_COMPILE([extern void log (const char *f, ...)
__attribute__ ((__noreturn__));],,
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[extern void log (const char *f, ...)
__attribute__ ((__noreturn__));]], [[]])],
[kom_cv_c_attribute_noreturn=yes],
[kom_cv_c_attribute_noreturn=no])])
AC_MSG_RESULT($kom_cv_c_attribute_noreturn)
......@@ -361,7 +358,7 @@ dnl always returns 2147483647. Not very helpful.
then]
AC_CACHE_CHECK([for working setrlimit(RLIMIT_NOFILE, ...)],
kom_cv_func_rlimit_nofile,
AC_TRY_RUN([
AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <stdio.h>
#ifdef HAVE_SYS_RESOURCE_H
# ifdef TIME_WITH_SYS_TIME
......@@ -427,7 +424,8 @@ int main()
fprintf(stderr, "setrlimit not available\n");
return 1;
#endif
}], [kom_cv_func_rlimit_nofile=yes],
}]])],
[kom_cv_func_rlimit_nofile=yes],
[kom_cv_func_rlimit_nofile=no],
[kom_cv_func_rlimit_nofile=no]))
[if test $kom_cv_func_rlimit_nofile = no
......
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