2 dnl Copyright © 2008 Keith Packard <keithp@keithp.com>
4 dnl This program is free software; you can redistribute it and/or modify
5 dnl it under the terms of the GNU General Public License as published by
6 dnl the Free Software Foundation; either version 2 of the License, or
7 dnl (at your option) any later version.
9 dnl This program is distributed in the hope that it will be useful, but
10 dnl WITHOUT ANY WARRANTY; without even the implied warranty of
11 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 dnl General Public License for more details.
14 dnl You should have received a copy of the GNU General Public License along
15 dnl with this program; if not, write to the Free Software Foundation, Inc.,
16 dnl 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
18 dnl Process this file with autoconf to create configure.
22 AM_INIT_AUTOMAKE(cctools, 0.1)
25 dnl ==========================================================================
27 AM_CONFIG_HEADER(config.h)
35 if test "x$GCC" = "xyes"; then
36 WARN_CFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes \
37 -Wmissing-prototypes -Wmissing-declarations \
38 -Wnested-externs -fno-strict-aliasing"
39 AC_DEFINE_UNQUOTED(HAVE_WARNING_CPP_DIRECTIVE,1,
40 [Can use #warning in C files])
44 dnl ==========================================================================
46 AM_CONDITIONAL(CROSS_COMPILING, test $cross_compiling = yes)
48 dnl ==========================================================================
50 # Setup for compiling build tools (fc-glyphname, etc)
51 AC_MSG_CHECKING([for a C compiler for build tools])
52 if test $cross_compiling = yes; then
53 AC_CHECK_PROGS(CC_FOR_BUILD, gcc cc)
57 AC_MSG_RESULT([$CC_FOR_BUILD])
58 AC_SUBST(CC_FOR_BUILD)
60 AC_MSG_CHECKING([for suffix of executable build tools])
61 if test $cross_compiling = yes; then
62 cat >conftest.c <<\_______EOF
70 compile="$CC_FOR_BUILD conftest.c -o conftest$i"
71 if AC_TRY_EVAL(compile); then
72 if (./conftest) 2>&AC_FD_CC; then
79 if test "${EXEEXT_FOR_BUILD+set}" != set; then
80 AC_MSG_ERROR([Cannot determine suffix of executable build tools])
83 EXEEXT_FOR_BUILD=$EXEEXT
85 AC_MSG_RESULT([$EXEEXT_FOR_BUILD])
86 AC_SUBST(EXEEXT_FOR_BUILD)