# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
+m4_include([intparam.m4])
+m4_include([floatparam.m4])
+
dnl -*- Autoconf -*-
dnl Copyright (C) 1993-2003 Free Software Foundation, Inc.
dnl This file is free software, distributed under the terms of the GNU
])
dnl -*- Autoconf -*-
-dnl Copyright (C) 1993-2003 Free Software Foundation, Inc.
+dnl Copyright (C) 1993-2005 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
AC_PREREQ(2.13)
+dnl CL_MACHINE([MESSAGE], [PROGRAM_TO_RUN], [CROSS_MACRO], [DESTINATION], [CACHE_VAR])
AC_DEFUN([CL_MACHINE],
[AC_REQUIRE([AC_PROG_CC])dnl
AC_REQUIRE([AC_C_CHAR_UNSIGNED])dnl
cl_machine_file_c=$2
-cl_machine_file_h=$3
-if test $cross_compiling = no; then
-if test -z "$[$4]"; then
+if test -z "$[$5]"; then
AC_CHECKING(for [$1])
+if test $cross_compiling = no; then
+cl_machine_file_h=$4
cat > conftest.$ac_ext <<EOF
#include "confdefs.h"
EOF
rm -f "$cl_machine_file_h"
mv conftest.h "$cl_machine_file_h"
fi
- [$4]=1
+ [$5]=1
else
echo "creation of $cl_machine_file_h failed"
fi
rm -f conftest*
-fi
else
-echo "cross-compiling - cannot create $cl_machine_file_h"
+$3([$4])
+fi
fi
])
-dnl Copyright (C) 1993-2002 Free Software Foundation, Inc.
+dnl Copyright (C) 1993-2005 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.
+dnl From Bruno Haible, Marcus Daniels, Paul Eggert.
AC_PREREQ(2.13)
[AC_CACHE_CHECK(for long double type, cl_cv_c_longdouble, [
AC_TRY_RUN([int main()
{ long double x = 2.7182818284590452354L; x = x*x; exit (x==0.0L); }],
-cl_cv_c_longdouble=yes, cl_cv_c_longdouble=no,
-dnl When cross-compiling, don't assume anything.
-cl_cv_c_longdouble="guessing no")
-])
-case "$cl_cv_c_longdouble" in
- *yes) AC_DEFINE(HAVE_LONGDOUBLE) ;;
- *no) ;;
-esac
+cl_cv_c_longdouble=yes, cl_cv_c_longdouble=no, [
+dnl When cross-compiling, use the test from gnulib.
+AC_TRY_COMPILE([
+ /* The Stardent Vistra knows sizeof(long double), but does not support it. */
+ long double foo = 0.0;
+ /* On Ultrix 4.3 cc, long double is 4 and double is 8. */
+ int array [2*(sizeof(long double) >= sizeof(double)) - 1];
+ ], , cl_cv_c_longdouble=yes, cl_cv_c_longdouble=no)])
+])
+if test $cl_cv_c_longdouble = yes; then
+ AC_DEFINE(HAVE_LONGDOUBLE)
+fi
])
dnl -*- Autoconf -*-
-dnl Copyright (C) 1993-2003 Free Software Foundation, Inc.
+dnl Copyright (C) 1993-2005 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.
+dnl From Bruno Haible, Marcus Daniels, Sam Steingold, Paul Eggert.
AC_PREREQ(2.57)
exit(!(((long long) x)*((long long) y)>>32 == z));
}
}],
-cl_cv_c_longlong=yes, cl_cv_c_longlong=no,
-dnl When cross-compiling, don't assume anything.
-cl_cv_c_longlong="guessing no")
-])
-case "$cl_cv_c_longlong" in
- *yes) AC_DEFINE(HAVE_LONGLONG,,[compiler supports the `long long' type]) ;;
- *no) ;;
-esac
+cl_cv_c_longlong=yes, cl_cv_c_longlong=no, [
+dnl When cross-compiling, use the test from gnulib.
+AC_TRY_LINK([long long ll = 1LL; int i = 63;],
+ [long long llmax = (long long) -1;
+ return ll << i | ll >> i | llmax / ll | llmax % ll;],
+ cl_cv_c_longlong=yes,
+ cl_cv_c_longlong=no)])
+])
+if test $cl_cv_c_longlong = yes; then
+ AC_DEFINE(HAVE_LONGLONG,,[compiler supports the `long long' type])
+fi
])
dnl -*- Autoconf -*-
dnl When cross-compiling, don't assume anything.
cl_cv_func_getrusage_works="guessing no")])
fi
- if test $cl_cv_func_getrusage_works = yes; then
+ if test "$cl_cv_func_getrusage_works" = yes; then
AC_DEFINE(HAVE_GETRUSAGE,,[have <sys/time.h>, the getrusage() function, the struct rusage type, and <sys/resource.h> defines RUSAGE_SELF])
AC_DEFINE_UNQUOTED(RUSAGE_WHO_T,$cl_cv_proto_getrusage_arg1,[type of `who' in getrusage() declaration])
fi
fi
])
+m4_include([m4/cc.m4])
m4_include([m4/gmp.m4])
m4_include([m4/libtool.m4])