-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+# 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
AC_ARG_PROGRAM
m4_pattern_allow([^AS_FOR_TARGET$])dnl
+m4_pattern_allow([^AS_FOR_BUILD$])dnl
# Get 'install' or 'install-sh' and its variants.
AC_PROG_INSTALL
# if PWD already has a value, it is probably wrong.
if test -n "$PWD" ; then PWD=`${PWDCMD-pwd}`; fi
-# Export original configure arguments for use by sub-configures. These
-# will be expanded by make, so quote '$'.
-tmp="$progname $@"
-sed -e 's,\$,$$,g' <<EOF_SED > conftestsed.out
-$tmp
-EOF_SED
-TOPLEVEL_CONFIGURE_ARGUMENTS=`cat conftestsed.out`
-rm -f conftestsed.out
+# Export original configure arguments for use by sub-configures.
+# Quote arguments with shell meta charatcers.
+TOPLEVEL_CONFIGURE_ARGUMENTS=
+set -- "$progname" "$@"
+for ac_arg
+do
+ case "$ac_arg" in
+ *" "*|*" "*|*[[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\']]*)
+ ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
+ # if the argument is of the form -foo=baz, quote the baz part only
+ ac_arg=`echo "'$ac_arg'" | sed "s/^'\([[-a-zA-Z0-9]]*=\)/\\1'/"` ;;
+ *) ;;
+ esac
+ # Add the quoted argument to the list.
+ TOPLEVEL_CONFIGURE_ARGUMENTS="$TOPLEVEL_CONFIGURE_ARGUMENTS $ac_arg"
+done
+if test "$silent" = yes; then
+ TOPLEVEL_CONFIGURE_ARGUMENTS="$TOPLEVEL_CONFIGURE_ARGUMENTS --silent"
+fi
+# Remove the initial space we just introduced and, as these will be
+# expanded by make, quote '$'.
+TOPLEVEL_CONFIGURE_ARGUMENTS=`echo "x$TOPLEVEL_CONFIGURE_ARGUMENTS" | sed -e 's/^x *//' -e 's,\\$,$$,g'`
AC_SUBST(TOPLEVEL_CONFIGURE_ARGUMENTS)
moveifchange=${srcdir}/move-if-change
# these libraries are built for the target environment, and are built after
# the host libraries and the host tools (which may be a cross compiler)
#
-target_libraries="target-libiberty \
- target-libgcc \
+target_libraries="target-libgcc \
+ target-libiberty \
target-libgloss \
target-newlib \
+ target-libgomp \
target-libstdc++-v3 \
target-libmudflap \
target-libssp \
target-boehm-gc \
${libgcj} \
target-libobjc \
- target-libada \
- target-libgomp"
+ target-libada"
# these tools are built using the target libraries, and are intended to
# run only in the target environment
AC_ARG_ENABLE(libada,
-[ --enable-libada Builds libada directory],
+[ --enable-libada build libada directory],
ENABLE_LIBADA=$enableval,
ENABLE_LIBADA=yes)
if test "${ENABLE_LIBADA}" != "yes" ; then
fi
AC_ARG_ENABLE(libssp,
-[ --enable-libssp Builds libssp directory],
+[ --enable-libssp build libssp directory],
ENABLE_LIBSSP=$enableval,
ENABLE_LIBSSP=yes)
# Disable libmudflap on some systems.
if test x$enable_libmudflap = x ; then
case "${target}" in
- *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu)
+ *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | bfin*-*-uclinux*)
# Enable libmudflap by default in GNU and friends.
;;
*-*-freebsd*)
esac
fi
+# Default libgloss CPU subdirectory.
+libgloss_dir="$target_cpu"
case "${target}" in
*-*-chorusos)
*) noconfigdirs="$noconfigdirs gdb readline"
;;
esac
+ libgloss_dir=wince
;;
arc-*-*)
noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
;;
arm-*-coff | strongarm-*-coff | xscale-*-coff)
noconfigdirs="$noconfigdirs ${libgcj}"
+ libgloss_dir=arm
;;
arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* )
noconfigdirs="$noconfigdirs target-libffi target-qthreads"
+ libgloss_dir=arm
;;
arm*-*-linux-gnueabi)
- noconfigdirs="$noconfigdirs target-libffi target-qthreads"
- noconfigdirs="$noconfigdirs target-libjava target-libobjc"
+ noconfigdirs="$noconfigdirs target-qthreads"
+ noconfigdirs="$noconfigdirs target-libobjc"
+ case ${with_newlib} in
+ no) noconfigdirs="$noconfigdirs target-newlib target-libgloss"
+ esac
+ libgloss_dir=arm
;;
arm*-*-symbianelf*)
noconfigdirs="$noconfigdirs ${libgcj} target-libiberty"
+ libgloss_dir=arm
;;
arm-*-pe*)
noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
unsupported_languages="$unsupported_languages fortran"
noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss";;
esac
+ libgloss_dir=cris
;;
crx-*-*)
noconfigdirs="$noconfigdirs target-libstdc++-v3 target-mudflap ${libgcj}"
d30v-*-*)
noconfigdirs="$noconfigdirs ${libgcj} gdb"
;;
+ ep9312-*-elf | ep9312-*-coff)
+ libgloss_dir=arm
+ ;;
fr30-*-elf*)
noconfigdirs="$noconfigdirs ${libgcj} gdb"
;;
hppa*-hp-hpux11*)
noconfigdirs="$noconfigdirs ld shellutils"
;;
+ hppa*-*-pro*)
+ libgloss_dir=pa
+ ;;
hppa*-*-*)
# According to Alexandre Oliva <aoliva@redhat.com>, libjava won't
# build on HP-UX 10.20.
;;
i[[3456789]]86-*-coff | i[[3456789]]86-*-elf)
noconfigdirs="$noconfigdirs ${libgcj}"
+ libgloss_dir=i386
;;
i[[3456789]]86-*-linux*)
# The GCC port for glibc1 has no MD_FALLBACK_FRAME_STATE_FOR, so let's
;;
m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*)
noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj}"
+ libgloss_dir=m68hc11
;;
m68k-*-elf*)
noconfigdirs="$noconfigdirs ${libgcj}"
m68k-*-coff*)
noconfigdirs="$noconfigdirs ${libgcj}"
;;
+ m68*-*-* | fido-*-*)
+ libgloss_dir=m68k
+ ;;
mcore-*-pe*)
# The EPOC C++ environment does not support exceptions or rtti,
# and so building libstdc++-v3 tends not to always work.
# This is temporary until we can link against shared libraries
powerpcle-*-solaris*)
noconfigdirs="$noconfigdirs gdb sim make tcl tk expect itcl gnuserv ${libgcj}"
+ libgloss_dir=rs6000
;;
powerpc-*-beos*)
noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}"
;;
powerpc-*-eabi)
noconfigdirs="$noconfigdirs ${libgcj}"
+ libgloss_dir=rs6000
;;
powerpc-*-eabi* | powerpcle-*-eabi* | powerpc-*-rtems* )
+ libgloss_dir=rs6000
;;
rs6000-*-lynxos*)
noconfigdirs="$noconfigdirs target-newlib gprof ${libgcj}"
m68k-apollo-*)
noconfigdirs="$noconfigdirs ld binutils gprof target-libgloss ${libgcj}"
;;
+ mips*-sde-elf*)
+ skipdirs="$skipdirs target-libiberty"
+ noconfigdirs="$noconfigdirs ${libgcj}"
+ if test x$with_newlib = xyes; then
+ noconfigdirs="$noconfigdirs gprof"
+ fi
+ libgloss_dir=mips
+ ;;
mips*-*-irix5*)
noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
;;
mips*-*-bsd*)
noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
;;
- mips64*-*-linux*)
- noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
- ;;
mips*-*-linux*)
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
;;
mips*-*-*)
noconfigdirs="$noconfigdirs gprof ${libgcj}"
+ libgloss_dir=mips
;;
romp-*-*)
noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}"
esac
noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
;;
+ sparclet-*-aout* | sparc86x-*-*)
+ libgloss_dir=sparc
+ ;;
sparc-*-elf*)
noconfigdirs="$noconfigdirs ${libgcj}"
;;
sparc64-*-elf*)
noconfigdirs="$noconfigdirs ${libgcj}"
+ libgloss_dir=sparc
;;
sparclite-*-*)
noconfigdirs="$noconfigdirs ${libgcj}"
+ libgloss_dir=sparc
;;
sparc-*-sunos4*)
noconfigdirs="$noconfigdirs ${libgcj}"
host_makefile_frag="config/mh-cygwin"
;;
*-mingw32*)
+ host_makefile_frag="config/mh-mingw"
;;
*-mingw64*)
+ host_makefile_frag="config/mh-mingw"
;;
*-interix*)
host_makefile_frag="config/mh-interix"
fi
if test "${build}" != "${host}" ; then
+ AR_FOR_BUILD=${AR_FOR_BUILD-ar}
+ AS_FOR_BUILD=${AS_FOR_BUILD-as}
CC_FOR_BUILD=${CC_FOR_BUILD-gcc}
+ CXX_FOR_BUILD=${CXX_FOR_BUILD-g++}
+ GCJ_FOR_BUILD=${GCJ_FOR_BUILD-gcj}
+ GFORTRAN_FOR_BUILD=${GFORTRAN_FOR_BUILD-gfortran}
+ DLLTOOL_FOR_BUILD=${DLLTOOL_FOR_BUILD-dlltool}
+ LD_FOR_BUILD=${LD_FOR_BUILD-ld}
+ NM_FOR_BUILD=${NM_FOR_BUILD-nm}
+ RANLIB_FOR_BUILD=${RANLIB_FOR_BUILD-ranlib}
+ WINDRES_FOR_BUILD=${WINDRES_FOR_BUILD-windres}
+ WINDMC_FOR_BUILD=${WINDMC_FOR_BUILD-windmc}
else
+ AR_FOR_BUILD="\$(AR)"
+ AS_FOR_BUILD="\$(AS)"
CC_FOR_BUILD="\$(CC)"
+ CXX_FOR_BUILD="\$(CXX)"
+ GCJ_FOR_BUILD="\$(GCJ)"
+ GFORTRAN_FOR_BUILD="\$(GFORTRAN)"
+ DLLTOOL_FOR_BUILD="\$(DLLTOOL)"
+ LD_FOR_BUILD="\$(LD)"
+ NM_FOR_BUILD="\$(NM)"
+ RANLIB_FOR_BUILD="\$(RANLIB)"
+ WINDRES_FOR_BUILD="\$(WINDRES)"
+ WINDMC_FOR_BUILD="\$(WINDMC)"
fi
AC_PROG_CC
# Specify a location for mpfr
# check for this first so it ends up on the link line before gmp.
-AC_ARG_WITH(mpfr-dir, [ --with-mpfr-dir=PATH This option has been REMOVED],
+AC_ARG_WITH(mpfr-dir, [ --with-mpfr-dir=PATH this option has been REMOVED],
AC_MSG_ERROR([The --with-mpfr-dir=PATH option has been removed.
Use --with-mpfr=PATH or --with-mpfr-include=PATH plus --with-mpfr-lib=PATH]))
-AC_ARG_WITH(mpfr, [ --with-mpfr=PATH Specify prefix directory for installed MPFR package
+AC_ARG_WITH(mpfr, [ --with-mpfr=PATH specify prefix directory for installed MPFR package.
Equivalent to --with-mpfr-include=PATH/include
plus --with-mpfr-lib=PATH/lib])
AC_ARG_WITH(mpfr_include, [ --with-mpfr-include=PATH
- Specify directory for installed MPFR include files])
-AC_ARG_WITH(mpfr_lib, [ --with-mpfr-lib=PATH Specify the directory for the installed MPFR library])
+ specify directory for installed MPFR include files])
+AC_ARG_WITH(mpfr_lib, [ --with-mpfr-lib=PATH specify directory for the installed MPFR library])
if test "x$with_mpfr" != x; then
gmplibs="-L$with_mpfr/lib $gmplibs"
fi
# Specify a location for gmp
-AC_ARG_WITH(gmp-dir, [ --with-gmp-dir=PATH This option has been REMOVED],
+AC_ARG_WITH(gmp-dir, [ --with-gmp-dir=PATH this option has been REMOVED],
AC_MSG_ERROR([The --with-gmp-dir=PATH option has been removed.
Use --with-gmp=PATH or --with-gmp-include=PATH plus --with-gmp-lib=PATH]))
-AC_ARG_WITH(gmp, [ --with-gmp=PATH Specify prefix directory for the installed GMP package
+AC_ARG_WITH(gmp, [ --with-gmp=PATH specify prefix directory for the installed GMP package.
Equivalent to --with-gmp-include=PATH/include
plus --with-gmp-lib=PATH/lib])
-AC_ARG_WITH(gmp_include, [ --with-gmp-include=PATH Specify directory for installed GMP include files])
-AC_ARG_WITH(gmp_lib, [ --with-gmp-lib=PATH Specify the directory for the installed GMP library])
+AC_ARG_WITH(gmp_include, [ --with-gmp-include=PATH specify directory for installed GMP include files])
+AC_ARG_WITH(gmp_lib, [ --with-gmp-lib=PATH specify directory for the installed GMP library])
if test "x$with_gmp" != x; then
#if MPFR_VERSION < MPFR_VERSION_NUM(2,2,0)
choke me
#endif
- mpfr_t n; mpfr_init(n);
- mpfr_t x; mpfr_init(x);
+ mpfr_t n;
+ mpfr_t x;
int t;
+ mpfr_init (n);
+ mpfr_init (x);
mpfr_atan2 (n, n, x, GMP_RNDN);
mpfr_erfc (n, x, GMP_RNDN);
mpfr_subnormalize (x, t, GMP_RNDN);
done
AC_ARG_ENABLE(stage1-languages,
-[ --enable-stage1-languages[=all] choose additional languages to build during
+[ --enable-stage1-languages@<:@=all@:>@ choose additional languages to build during
stage1. Mostly useful for compiler development.],
[case ,${enable_stage1_languages}, in
,no,|,,)
fi
AC_SUBST(stage1_languages)
- ac_configure_args=`echo " $ac_configure_args" | sed -e 's/ --enable-languages=[[^ ]]*//' -e 's/$/ --enable-languages='"$enable_languages"/ `
+ ac_configure_args=`echo " $ac_configure_args" | sed -e "s/ '--enable-languages=[[^ ]]*'//g" -e "s/$/ '--enable-languages="$enable_languages"'/" `
fi
# Handle --disable-<component> generically.
# Check for Boehm's garbage collector
AC_ARG_ENABLE(objc-gc,
-[ --enable-objc-gc enable the use of Boehm's garbage collector with
- the GNU Objective-C runtime.],
+[ --enable-objc-gc enable use of Boehm's garbage collector with the
+ GNU Objective-C runtime],
[case ,${enable_languages},:${enable_objc_gc}:${noconfigdirs} in
*,objc,*:*:yes:*target-boehm-gc*)
AC_MSG_ERROR([Boehm's garbage collector was requested yet not supported in this configuration])
copy_dirs=
AC_ARG_WITH([build-sysroot],
- [ --with-build-sysroot=sysroot
+ [ --with-build-sysroot=SYSROOT
use sysroot as the system root during the build],
[if test x"$withval" != x ; then
SYSROOT_CFLAGS_FOR_TARGET="--sysroot=$withval"
[SYSROOT_CFLAGS_FOR_TARGET=])
AC_SUBST(SYSROOT_CFLAGS_FOR_TARGET)
+AC_ARG_WITH([debug-prefix-map],
+ [ --with-debug-prefix-map='A=B C=D ...'
+ map A to B, C to D ... in debug information],
+ [if test x"$withval" != x; then
+ DEBUG_PREFIX_CFLAGS_FOR_TARGET=
+ for debug_map in $withval; do
+ DEBUG_PREFIX_CFLAGS_FOR_TARGET="$DEBUG_PREFIX_CFLAGS_FOR_TARGET -fdebug-prefix-map=$debug_map"
+ done
+ fi],
+ [DEBUG_PREFIX_CFLAGS_FOR_TARGET=])
+AC_SUBST(DEBUG_PREFIX_CFLAGS_FOR_TARGET)
+
# Handle --with-headers=XXX. If the value is not "yes", the contents of
# the named directory are copied to $(tooldir)/sys-include.
if test x"${with_headers}" != x && test x"${with_headers}" != xno ; then
alpha*-*-*vms*)
md_exec_prefix=/gnu/lib/gcc-lib
;;
- i[34567]86-pc-msdosdjgpp*)
+ i[[34567]]86-pc-msdosdjgpp*)
md_exec_prefix=/dev/env/DJDIR/bin
;;
- i[34567]86-*-sco3.2v5*)
+ i[[34567]]86-*-sco3.2v5*)
if test $with_gnu_as = yes; then
md_exec_prefix=/usr/gnu/bin
else
*-*-nto-qnx* | \
*-*-rtems* | \
*-*-solaris2* | \
- *-*-sysv[45]* | \
+ *-*-sysv[[45]]* | \
*-*-vxworks* | \
*-wrs-windiss)
md_exec_prefix=/usr/ccs/bin
spu-*-*)
target_makefile_frag="config/mt-spu"
;;
+ mips*-sde-elf*)
+ target_makefile_frag="config/mt-sde"
+ ;;
+ mipsisa*-*-elfoabi*)
+ target_makefile_frag="config/mt-mips-elfoabi"
+ ;;
*-*-netware*)
target_makefile_frag="config/mt-netware"
;;
# not to nest @if/@endif pairs, because configure will not warn you at all.
AC_ARG_ENABLE([bootstrap],
-[ --enable-bootstrap Enable bootstrapping [yes if native build]],,
+[ --enable-bootstrap enable bootstrapping @<:@yes if native build@:>@],,
enable_bootstrap=default)
# Issue errors and warnings for invalid/strange bootstrap combinations.
# Create the serialization dependencies. This uses a temporary file.
AC_ARG_ENABLE([serial-configure],
-[ --enable-serial-[{host,target,build}-]configure
- Force sequential configuration of
+[ --enable-serial-@<:@{host,target,build}-@:>@configure
+ force sequential configuration of
sub-packages for the host, target or build
- machine, or all sub-packages])
+ machine, or all sub-packages])
case ${enable_serial_configure} in
yes)
gcc_transform_name=`cat conftestsed.out`
rm -f conftestsed.out
baseargs="$baseargs --program-transform-name='${gcc_transform_name}'"
+if test "$silent" = yes; then
+ baseargs="$baseargs --silent"
+fi
# For the build-side libraries, we just need to pretend we're native,
# and not use the same cache file. Multilibs are neither needed nor
# for any libc-related directories first (so make it the last -B
# switch).
FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$$r/$(TARGET_SUBDIR)/newlib/ -isystem $$r/$(TARGET_SUBDIR)/newlib/targ-include -isystem $$s/newlib/libc/include'
+
+ # If we're building libgloss, find the startup file, simulator library
+ # and linker script.
+ case " $target_configdirs " in
+ *" libgloss "*)
+ # Look for startup file, simulator library and maybe linker script.
+ FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$$r/$(TARGET_SUBDIR)/libgloss/'"$libgloss_dir"
+ # Look for libnosys.a in case the target needs it.
+ FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(TARGET_SUBDIR)/libgloss/libnosys'
+ # Most targets have the linker script in the source directory.
+ FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$s/libgloss/'"$libgloss_dir"
+ ;;
+ esac
;;
esac
;;
# Allow the user to override the flags for
# our build compiler if desired.
-CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD-${CFLAGS}}
+if test x"${build}" = x"${host}" ; then
+ CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD-${CFLAGS}}
+ CXXFLAGS_FOR_BUILD=${CXXFLAGS_FOR_BUILD-${CXXFLAGS}}
+ LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-${LDFLAGS}}
+fi
# On Canadian crosses, we'll be searching the right directories for
# the previously-installed cross compiler, so don't bother to add
# Search for other target-specific linker scripts and such.
case "${target}" in
- m32c-*-* )
- if test -d ${srcdir}/libgloss/m32c; then
- # This is for crt0.o
- FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$$r/$(TARGET_SUBDIR)/libgloss/m32c'
- # This is for r8c.ld
- FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(TARGET_SUBDIR)/libgloss/m32c'
- # This is for libnosys.a
- FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(TARGET_SUBDIR)/libgloss/libnosys'
- fi
- ;;
mep*)
FLAGS_FOR_TARGET="$FLAGS_FOR_TARGET -mlibrary"
;;
# Build tools.
+AC_SUBST(AR_FOR_BUILD)
+AC_SUBST(AS_FOR_BUILD)
AC_SUBST(CC_FOR_BUILD)
+AC_SUBST(CFLAGS_FOR_BUILD)
+AC_SUBST(CXXFLAGS_FOR_BUILD)
+AC_SUBST(CXX_FOR_BUILD)
+AC_SUBST(DLLTOOL_FOR_BUILD)
+AC_SUBST(GCJ_FOR_BUILD)
+AC_SUBST(GFORTRAN_FOR_BUILD)
+AC_SUBST(LDFLAGS_FOR_BUILD)
+AC_SUBST(LD_FOR_BUILD)
+AC_SUBST(NM_FOR_BUILD)
+AC_SUBST(RANLIB_FOR_BUILD)
+AC_SUBST(WINDMC_FOR_BUILD)
+AC_SUBST(WINDRES_FOR_BUILD)
AC_SUBST(config_shell)
# Generate default definitions for YACC, M4, LEX and other programs that run
*" texinfo "*) MAKEINFO='$$r/$(BUILD_SUBDIR)/texinfo/makeinfo/makeinfo' ;;
*)
changequote(,)
- # For an installed makeinfo, we require it to be from texinfo 4.4 or
+ # For an installed makeinfo, we require it to be from texinfo 4.6 or
# higher, else we use the "missing" dummy.
if ${MAKEINFO} --version \
- | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[4-9]|[5-9])' >/dev/null 2>&1; then
+ | egrep 'texinfo[^0-9]*(4\.([6-9]|[1-9][0-9])|[5-9]|[1-9][0-9])' >/dev/null 2>&1; then
:
else
MAKEINFO="$MISSING makeinfo"
NCN_STRICT_CHECK_TOOLS(RANLIB, ranlib, :)
NCN_STRICT_CHECK_TOOLS(STRIP, strip, :)
NCN_STRICT_CHECK_TOOLS(WINDRES, windres)
+NCN_STRICT_CHECK_TOOLS(WINDMC, windmc)
NCN_STRICT_CHECK_TOOLS(OBJCOPY, objcopy)
NCN_STRICT_CHECK_TOOLS(OBJDUMP, objdump)
AC_SUBST(CC)
AC_SUBST(CXX)
AC_SUBST(CFLAGS)
-AC_SUBST(CFLAGS_FOR_BUILD)
AC_SUBST(CXXFLAGS)
# Target tools.
AC_ARG_WITH([build-time-tools],
- [ --with-build-time-tools=path
+ [ --with-build-time-tools=PATH
use given path to find target tools during the build],
[case x"$withval" in
x/*) ;;
ACX_CHECK_INSTALLED_TARGET_TOOL(RANLIB_FOR_TARGET, ranlib, :)
ACX_CHECK_INSTALLED_TARGET_TOOL(STRIP_FOR_TARGET, strip)
ACX_CHECK_INSTALLED_TARGET_TOOL(WINDRES_FOR_TARGET, windres)
+ACX_CHECK_INSTALLED_TARGET_TOOL(WINDMC_FOR_TARGET, windmc)
RAW_CXX_FOR_TARGET="$CXX_FOR_TARGET"
GCC_TARGET_TOOL(ranlib, RANLIB_FOR_TARGET, RANLIB, [binutils/ranlib])
GCC_TARGET_TOOL(strip, STRIP_FOR_TARGET, STRIP, [binutils/strip])
GCC_TARGET_TOOL(windres, WINDRES_FOR_TARGET, WINDRES, [binutils/windres])
+GCC_TARGET_TOOL(windmc, WINDMC_FOR_TARGET, WINDMC, [binutils/windmc])
AC_SUBST(FLAGS_FOR_TARGET)
AC_SUBST(RAW_CXX_FOR_TARGET)
# Pass -fkeep-inline-functions for stage 1 if the GCC version supports it.
CFLAGS="$CFLAGS -fkeep-inline-functions"
AC_MSG_CHECKING([whether -fkeep-inline-functions is supported])
- AC_TRY_COMPILE(,,
+ AC_TRY_COMPILE([
+#if (__GNUC__ < 3) \
+ || (__GNUC__ == 3 && (__GNUC_MINOR__ < 3 \
+ || (__GNUC_MINOR__ == 3 && __GNUC_PATCHLEVEL__ < 1)))
+#error http://gcc.gnu.org/PR29382
+#endif
+ ],,
[AC_MSG_RESULT([yes]); stage1_cflags="$stage1_cflags -fkeep-inline-functions"],
[AC_MSG_RESULT([no])])
# Enable --enable-checking in stage1 of the compiler.
AC_ARG_ENABLE(stage1-checking,
-[ --enable-stage1-checking[=all] choose additional checking for stage1
- of the compiler.],
+[ --enable-stage1-checking@<:@=all@:>@ choose additional checking for stage1
+ of the compiler],
[stage1_checking=--enable-checking=${enable_stage1_checking}],
-[if test "x$enable_checking" = xno; then
- stage1_checking=--enable-checking
+[if test "x$enable_checking" = xno || test "x$enable_checking" = x; then
+ stage1_checking=--enable-checking=yes,types
else
- stage1_checking=--enable-checking${enable_checking+=}$enable_checking
+ stage1_checking=--enable-checking=$enable_checking,types
fi])
AC_SUBST(stage1_checking)
# Flags needed to enable html installing and building
AC_ARG_WITH(datarootdir,
-[ --with-datarootdir Use datarootdir as the data root directory.],
+[ --with-datarootdir use datarootdir as the data root directory.],
[datarootdir="\${prefix}/${withval}"],
[datarootdir="\${prefix}/share"])
AC_ARG_WITH(docdir,
-[ --with-docdir Install documentation in this directory.],
+[ --with-docdir install documentation in this directory.],
[docdir="\${prefix}/${withval}"],
[docdir="\${datarootdir}/doc"])
+AC_ARG_WITH(pdfdir,
+[ --with-pdfdir install pdf in this directory.],
+[pdfdir="\${prefix}/${withval}"],
+[pdfdir="\${docdir}"])
+
AC_ARG_WITH(htmldir,
-[ --with-htmldir Install html in this directory.],
+[ --with-htmldir install html in this directory.],
[htmldir="\${prefix}/${withval}"],
[htmldir="\${docdir}"])
AC_SUBST(datarootdir)
AC_SUBST(docdir)
+AC_SUBST(pdfdir)
AC_SUBST(htmldir)
AC_OUTPUT(Makefile)