2 dnl Copyright (C) 1993-2005 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],
15 [AC_REQUIRE([AC_PROG_CC])dnl
16 AC_REQUIRE([AC_C_CHAR_UNSIGNED])dnl
18 if test -z "$[$5]"; then
20 if test $cross_compiling = no; then
22 cat > conftest.$ac_ext <<EOF
25 cat "$cl_machine_file_c" >> conftest.$ac_ext
27 if test $ac_cv_prog_gcc = yes; then
28 # gcc -O (gcc version <= 2.3.2) crashes when compiling long long shifts for
29 # target 80386. Strip "-O".
30 CC=`echo "$CC " | sed -e 's/-O //g'`
34 if test -s conftest${ac_exeext}; then
35 echo "creating $cl_machine_file_h"
36 ./conftest${ac_exeext} > conftest.h
37 if cmp -s "$cl_machine_file_h" conftest.h 2>/dev/null; then
38 # The file exists and we would not be changing it
41 rm -f "$cl_machine_file_h"
42 mv conftest.h "$cl_machine_file_h"
46 echo "creation of $cl_machine_file_h failed"
50 echo "creating $cl_machine_file_h"