2 dnl Copyright (C) 1993-2008, 2011, 2017 Free Software Foundation, Inc.
3 dnl This file is free software, distributed under the terms of the GNU
4 dnl General Public License. As a special exception to the GNU General
5 dnl Public License, this file may be distributed as part of a program
6 dnl that contains a configuration script generated by Autoconf, under
7 dnl the same distribution terms as the rest of that program.
9 dnl From Bruno Haible, Marcus Daniels, Sam Steingold.
13 dnl CL_MACHINE([MESSAGE], [PROGRAM_TO_RUN], [CROSS_MACRO], [DESTINATION], [CACHE_VAR])
14 AC_DEFUN([CL_MACHINE],
16 AC_REQUIRE([AC_PROG_CC])
17 AC_REQUIRE([AC_C_CHAR_UNSIGNED])
19 if test -z "$[$5]"; then
20 AC_MSG_CHECKING(for [$1])
22 cl_machine_file_program=`cat "$cl_machine_file_c"`
26 $cl_machine_file_program
28 [AC_MSG_RESULT([created $cl_machine_file_h])
29 if cmp -s "$cl_machine_file_h" conftest.h 2>/dev/null; then
30 # The file exists and we would not be changing it
33 rm -f "$cl_machine_file_h"
34 mv conftest.h "$cl_machine_file_h"
38 [AC_MSG_RESULT([creation of $cl_machine_file_h failed])],
39 [AC_MSG_RESULT([creating $cl_machine_file_h])