File: acinclude.m4

package info (click to toggle)
lyskom-server 2.0.6-1woody1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 7,320 kB
  • ctags: 3,514
  • sloc: ansic: 39,587; exp: 4,961; python: 1,976; sh: 1,512; makefile: 627; yacc: 463; awk: 326; lisp: 237; lex: 218; sed: 8
file content (56 lines) | stat: -rw-r--r-- 2,178 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
dnl $Id: acinclude.m4,v 1.5 2001/09/30 16:52:08 ceder Exp $
dnl Copyright (C) 1994-1995, 1998-1999, 2001  Lysator Academic Computer Association.
dnl
dnl This file is part of the LysKOM server.
dnl 
dnl LysKOM is free software; you can redistribute it and/or modify it
dnl under the terms of the GNU General Public License as published by 
dnl the Free Software Foundation; either version 1, or (at your option) 
dnl any later version.
dnl 
dnl LysKOM is distributed in the hope that it will be useful, but WITHOUT
dnl ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
dnl FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
dnl for more details.
dnl 
dnl You should have received a copy of the GNU General Public License
dnl along with LysKOM; see the file COPYING.  If not, write to
dnl Lysator, c/o ISY, Linkoping University, S-581 83 Linkoping, SWEDEN,
dnl or the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, 
dnl MA 02139, USA.
dnl
dnl Please mail bug reports to bug-lyskom@lysator.liu.se. 
dnl

dnl
dnl Check if an option is acceptable to the C compiler in use.
dnl (This is taken verbatim from cmod 1.2.  Please don't make even a
dnl tiny change to it unless you change the name of all variables!
dnl See the cmod source code for more information.)
dnl
AC_DEFUN([CMOD_CHECK_CC_OPT],
[AC_MSG_CHECKING([whether ${CC} accepts $1])
AC_CACHE_VAL([cmod_cv_compiler_]$2,
[[cmod_oldflags=$CFLAGS
CFLAGS="$CFLAGS $1"]
AC_TRY_LINK(,,
	[cmod_cv_compiler_]$2[=yes],
	[cmod_cv_compiler_]$2[=no])
[CFLAGS=$cmod_oldflags]])dnl
AC_MSG_RESULT([$cmod_cv_compiler_]$2)
if test [$cmod_cv_compiler_]$2 = yes; then
  CFLAGS="$CFLAGS $1"
fi])dnl
dnl
dnl Another frozen defun.
dnl
AC_DEFUN(CMOD_C_ATTRIBUTE_UNUSED,
[AC_MSG_CHECKING([whether $CC understands __attribute__((unused))])
AC_CACHE_VAL([cmod_cv_c_attribute_unused_understood],
    AC_TRY_COMPILE(,[int i __attribute__((unused));],
	[cmod_cv_c_attribute_unused_understood=yes],
	[cmod_cv_c_attribute_unused_understood=no]))
AC_MSG_RESULT($cmod_cv_c_attribute_unused_understood)
[if test $cmod_cv_c_attribute_unused_understood = yes ; then]
    AC_DEFINE(HAVE_ATTRIBUTE_UNUSED)
[fi]])dnl