File: param.m4

package info (click to toggle)
cln 1.3.7-1
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 10,996 kB
  • sloc: cpp: 80,860; sh: 5,138; ansic: 3,174; makefile: 1,274
file content (44 lines) | stat: -rw-r--r-- 1,464 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
dnl -*- Autoconf -*-
dnl Copyright (C) 1993-2008, 2011, 2017 Free Software Foundation, Inc.
dnl This file is free software, distributed under the terms of the GNU
dnl General Public License.  As a special exception to the GNU General
dnl Public License, this file may be distributed as part of a program
dnl that contains a configuration script generated by Autoconf, under
dnl the same distribution terms as the rest of that program.

dnl From Bruno Haible, Marcus Daniels, Sam Steingold.

AC_PREREQ([2.61])

dnl CL_MACHINE([MESSAGE], [PROGRAM_TO_RUN], [CROSS_MACRO], [DESTINATION], [CACHE_VAR])
AC_DEFUN([CL_MACHINE],
[
  AC_REQUIRE([AC_PROG_CC])
  AC_REQUIRE([AC_C_CHAR_UNSIGNED])
  cl_machine_file_c=$2
  if test -z "$[$5]"; then
    AC_MSG_CHECKING(for [$1])
    cl_machine_file_h=$4
    cl_machine_file_program=`cat "$cl_machine_file_c"`
    AC_RUN_IFELSE(
      [AC_LANG_SOURCE([
         #include "confdefs.h"
         $cl_machine_file_program
         ])],
      [AC_MSG_RESULT([created $cl_machine_file_h])
       if cmp -s "$cl_machine_file_h" conftest.h 2>/dev/null; then
         # The file exists and we would not be changing it
         rm -f conftest.h
       else
         rm -f "$cl_machine_file_h"
         mv conftest.h "$cl_machine_file_h"
       fi
       [$5]=1
      ],
      [AC_MSG_RESULT([creation of $cl_machine_file_h failed])],
      [AC_MSG_RESULT([creating $cl_machine_file_h])
       $3([$4])
      ])
    rm -f conftest.h
  fi
])